Skip to content

Commit bcbada4

Browse files
committed
chore: trim the version prefix in the release download URL
Signed-off-by: chlins <[email protected]>
1 parent 0bdbc52 commit bcbada4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
- name: Create archive
105105
run: |
106106
mkdir -p dist
107-
tar -czf dist/modctl-${{ github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz \
107+
tar -czf dist/modctl-${{ startsWith(github.ref_name, 'v') && substring(github.ref_name, 1) || github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz \
108108
LICENSE README.md modctl
109109
110110
- name: Build deb/rpm packages
@@ -117,8 +117,8 @@ jobs:
117117
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list
118118
sudo apt update
119119
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
120+
nfpm pkg --packager deb --config hack/nfpm.yaml --target dist/modctl-${{ startsWith(github.ref_name, 'v') && substring(github.ref_name, 1) || github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }}.deb
121+
nfpm pkg --packager rpm --config hack/nfpm.yaml --target dist/modctl-${{ startsWith(github.ref_name, 'v') && substring(github.ref_name, 1) || github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }}.rpm
122122
123123
- name: Upload artifacts
124124
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)