Skip to content

Commit 5e6cc96

Browse files
yaalsnyaalsn
authored andcommitted
Add release workflow (#1790)
* Add release workflow * Add write permission --------- Co-authored-by: yaalsn <yaalsn@github.com> (cherry picked from commit 12b9259)
1 parent 381fb3c commit 5e6cc96

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release Pulsarctl
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v4
22+
with:
23+
go-version: '1.24'
24+
25+
- name: Get the version
26+
id: get_version
27+
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
28+
29+
- name: Build Release
30+
run: |
31+
chmod +x scripts/build.sh
32+
./scripts/build.sh ${{ steps.get_version.outputs.VERSION }}
33+
env:
34+
DOCKER_USERNAME: ${{ secrets.DOCKER_USER }}
35+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
36+
37+
- name: Create Release
38+
uses: softprops/action-gh-release@v1
39+
with:
40+
name: Release ${{ steps.get_version.outputs.VERSION }}
41+
files: |
42+
release/*.tar.gz
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)