+2
-1
.github/workflows/release.yaml
+2
-1
.github/workflows/release.yaml
···
22
22
goos: windows
23
23
steps:
24
24
- uses: actions/checkout@v3
25
+
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
25
26
- uses: wangyoucao577/go-release-action@v1
26
27
with:
27
28
github_token: ${{ secrets.PAT }}
28
29
goos: ${{ matrix.goos }}
29
30
goarch: ${{ matrix.goarch }}
30
31
project_path: "./cmd"
31
-
ldflags: "-X main._version=`git tag --sort=-version:refname | head -n 1`"
32
+
ldflags: "-X main._version=${{ env.RELEASE_VERSION }}"
32
33
binary_name: atr
33
34
sha256sum: true
34
35
md5sum: false