Skip to content

Commit

Permalink
更新action编排,自动替换版本号
Browse files Browse the repository at this point in the history
  • Loading branch information
hopetree committed Jun 7, 2024
1 parent ad60d70 commit 20796d8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/go-releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21
cache: true

- name: Replace version in version.go
run: |
tag=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
sed -i "s/const RuntimeVersion = \".*\"/const RuntimeVersion = \"$tag\"/" app/version.go
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand Down

0 comments on commit 20796d8

Please sign in to comment.