-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.29 KB
/
Copy pathrelease-binary.yml
File metadata and controls
40 lines (38 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Release Binary
on:
workflow_dispatch:
inputs:
version:
description: 'Version (e.g. 1.0.0)'
required: true
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
- run: |
V="v${{ inputs.version }}"
if git rev-parse "$V" >/dev/null 2>&1; then echo "tag exists"; else git config user.name ci; git config user.email ci@ci; git tag -a "$V" -m "$V"; git push origin "$V"; fi
- run: git fetch --tags origin # ensure local tag is visible
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: '1.24'
cache: true
- uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
cache: pnpm
- uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6
with:
distribution: goreleaser
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}