Skip to content

Commit e2a7800

Browse files
author
Mathieu Poussin
committed
Fix release job again
1 parent 22a8e62 commit e2a7800

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
~/.cargo/git/db/
2121
target/
2222
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
23+
- name: Get the version
24+
id: version
25+
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
2326
- name: Install cargo plugins
2427
run: cargo install cargo-rpm cargo-deb
2528
continue-on-error: true
@@ -47,7 +50,7 @@ jobs:
4750
with:
4851
upload_url: ${{ steps.create_release.outputs.upload_url }}
4952
asset_path: target/release/netbox2netshot
50-
asset_name: netbox2netshot-${{ github.ref }}
53+
asset_name: netbox2netshot-${{ steps.version.outputs.version }}
5154
asset_content_type: application/octet-stream
5255
- name: Upload rpm package
5356
id: upload-rpm
@@ -56,8 +59,8 @@ jobs:
5659
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5760
with:
5861
upload_url: ${{ steps.create_release.outputs.upload_url }}
59-
asset_path: target/release/rpmbuild/RPMS/x86_64/*.rpm
60-
asset_name: netbox2netshot-${{ github.ref }}.rpm
62+
asset_path: target/release/rpmbuild/RPMS/x86_64/netbox2netshot-${{ steps.version.outputs.version }}-1.x86_64.rpm
63+
asset_name: netbox2netshot-${{ steps.version.outputs.version }}-1.x86_64.rpm
6164
asset_content_type: application/octet-stream
6265
- name: Upload deb package
6366
id: upload-deb
@@ -66,6 +69,6 @@ jobs:
6669
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6770
with:
6871
upload_url: ${{ steps.create_release.outputs.upload_url }}
69-
asset_path: target/debian/*.deb
70-
asset_name: netbox2netshot-${{ github.ref }}.deb
72+
asset_path: target/debian/netbox2netshot_${{ steps.version.outputs.version }}_amd64.deb
73+
asset_name: netbox2netshot_${{ steps.version.outputs.version }}_amd64.deb
7174
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)