Skip to content

Commit 8fc578f

Browse files
authored
chore: trim the version prefix in the release download URL (#179)
Signed-off-by: chlins <[email protected]>
1 parent 0bdbc52 commit 8fc578f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/release.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ jobs:
103103
104104
- name: Create archive
105105
run: |
106+
TAG=${{ github.ref_name }}
107+
TAG=${TAG#v}
106108
mkdir -p dist
107-
tar -czf dist/modctl-${{ github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz \
109+
tar -czf dist/modctl-${TAG}-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz \
108110
LICENSE README.md modctl
109111
110112
- name: Build deb/rpm packages
@@ -117,8 +119,10 @@ jobs:
117119
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list
118120
sudo apt update
119121
sudo apt install nfpm
120-
nfpm pkg --packager deb --config hack/nfpm.yaml --target dist/modctl-${{ github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }}.deb
121-
nfpm pkg --packager rpm --config hack/nfpm.yaml --target dist/modctl-${{ github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }}.rpm
122+
TAG=${{ github.ref_name }}
123+
TAG=${TAG#v}
124+
nfpm pkg --packager deb --config hack/nfpm.yaml --target dist/modctl-${TAG}-${{ matrix.goos }}-${{ matrix.goarch }}.deb
125+
nfpm pkg --packager rpm --config hack/nfpm.yaml --target dist/modctl-${TAG}-${{ matrix.goos }}-${{ matrix.goarch }}.rpm
122126
123127
- name: Upload artifacts
124128
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)