From 20796d87f6f3b2fa88f9a51cc845768cd38cac2d Mon Sep 17 00:00:00 2001 From: hopetree Date: Fri, 7 Jun 2024 16:15:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0action=E7=BC=96=E6=8E=92?= =?UTF-8?q?=EF=BC=8C=E8=87=AA=E5=8A=A8=E6=9B=BF=E6=8D=A2=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/go-releaser.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/go-releaser.yml b/.github/workflows/go-releaser.yml index 7d8bf4c..8a92c3c 100644 --- a/.github/workflows/go-releaser.yml +++ b/.github/workflows/go-releaser.yml @@ -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: