Skip to content

Commit 26e6a75

Browse files
committed
Fix version extraction in cd pipeline
1 parent 228012d commit 26e6a75

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/cd.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jobs:
2222
steps:
2323
- name: Checkout sources
2424
uses: actions/checkout@v2
25+
- name: Get the version
26+
id: get_version
27+
uses: battila7/get-version-action@v2
2528
- name: Install build tools
2629
run: sudo apt-get install zip
2730
- name: Install stable toolchain
@@ -43,17 +46,14 @@ jobs:
4346
cp LICENSE dist/
4447
cp target/${{ matrix.job.target }}/release/${{ matrix.job.output }} dist/
4548
cd dist/ && zip -r ../dist.zip ./ && cd ..
46-
- name: Get the version
47-
id: get_version
48-
run: echo ::set-output name=VERSION::${${{ github.event.release.tag_name }}/v//}
4949
- name: Upload binary distribution
5050
uses: actions/upload-release-asset@v1
5151
env:
5252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5353
with:
5454
upload_url: ${{ steps.create_release.outputs.upload_url }}
5555
asset_path: dist.zip
56-
asset_name: storagereloaded_${{ steps.get_version.outputs.VERSION }}_${{ matrix.job.name }}.zip
56+
asset_name: storagereloaded_${{ steps.get_version.outputs.version-without-v }}_${{ matrix.job.name }}.zip
5757
asset_content_type: application/zip
5858

5959
deb:
@@ -69,6 +69,9 @@ jobs:
6969
steps:
7070
- name: Checkout sources
7171
uses: actions/checkout@v2
72+
- name: Get the version
73+
id: get_version
74+
uses: battila7/get-version-action@v2
7275
- name: Install stable toolchain
7376
uses: actions-rs/toolchain@v1
7477
with:
@@ -93,15 +96,12 @@ jobs:
9396
use-cross: false
9497
command: deb
9598
args: --no-build --no-strip --target=${{ matrix.job.target }}
96-
- name: Get the version
97-
id: get_version
98-
run: echo ::set-output name=VERSION::${${{ github.event.release.tag_name }}/v//}
9999
- name: Upload deb
100100
uses: actions/upload-release-asset@v1
101101
env:
102102
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103103
with:
104104
upload_url: ${{ steps.create_release.outputs.upload_url }}
105-
asset_path: target/${{ matrix.job.target }}/debian/storagereloaded_${{ steps.get_version.outputs.VERSION }}_${{ matrix.job.name }}.deb
106-
asset_name: storagereloaded_${{ steps.get_version.outputs.VERSION }}_${{ matrix.job.name }}.deb
105+
asset_path: target/${{ matrix.job.target }}/debian/storagereloaded_${{ steps.get_version.outputs.version-without-v }}_${{ matrix.job.name }}.deb
106+
asset_name: storagereloaded_${{ steps.get_version.outputs.version-without-v }}_${{ matrix.job.name }}.deb
107107
asset_content_type: application/vnd.debian.binary-package

0 commit comments

Comments
 (0)