Skip to content

Commit e46bc9e

Browse files
Update go.yml
1 parent 0f6f914 commit e46bc9e

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/go.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232
runs-on: ${{ matrix.os }}
3333
steps:
3434
- uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 0
3537
- uses: actions/setup-go@v5
3638
with:
3739
go-version: '1.22'
@@ -72,15 +74,21 @@ jobs:
7274
steps:
7375
- uses: actions/checkout@v4
7476
with:
77+
fetch-depth: 0
7578
token: ${{ secrets.GITHUB_TOKEN }}
7679

80+
81+
- name: Set release commit
82+
run: echo "RELEASE_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
83+
84+
7785

78-
- name: Create empty commit for release
86+
- name: Create tag on specific commit
7987
run: |
8088
git config user.name "github-actions"
8189
git config user.email "github-actions@github.com"
82-
git commit --allow-empty -m "chore: release ${{ github.event.inputs.tag_name }}"
83-
git push origin HEAD:main
90+
git tag ${{ github.event.inputs.tag_name }} ${{ env.RELEASE_COMMIT }}
91+
git push origin ${{ github.event.inputs.tag_name }}
8492
8593
- name: Download all build artifacts
8694
uses: actions/download-artifact@v4
@@ -92,5 +100,5 @@ jobs:
92100
with:
93101
tag_name: ${{ github.event.inputs.tag_name }}
94102
name: Release ${{ github.event.inputs.tag_name }}
95-
body: ""
103+
body: "Installation"
96104
files: artifacts/**/*.zip

0 commit comments

Comments
 (0)