-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (31 loc) · 888 Bytes
/
release.yaml
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
name: Release
on:
release:
types: [created]
permissions:
contents: write
jobs:
publish-cli:
if: startsWith(github.ref, 'refs/tags/v') == true
runs-on: macos-12
steps:
- name: Set up Go 1.23
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- id: get_version
run: |
RELEASE_VERSION=$(echo $GITHUB_REF | sed -nE 's!refs/tags/!!p')
echo "::set-output name=release_version::$RELEASE_VERSION"
- name: Compile binaries
run: |
chmod +x ./hack/build.sh
./hack/build.sh
env:
RELEASE_VERSION: ${{ steps.get_version.outputs.release_version }}
- name: Save release assets
uses: softprops/action-gh-release@v2
with:
files: release/*