|
20 | 20 | ~/.cargo/git/db/ |
21 | 21 | target/ |
22 | 22 | 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) |
23 | 26 | - name: Install cargo plugins |
24 | 27 | run: cargo install cargo-rpm cargo-deb |
25 | 28 | continue-on-error: true |
|
47 | 50 | with: |
48 | 51 | upload_url: ${{ steps.create_release.outputs.upload_url }} |
49 | 52 | asset_path: target/release/netbox2netshot |
50 | | - asset_name: netbox2netshot-${{ github.ref }} |
| 53 | + asset_name: netbox2netshot-${{ steps.version.outputs.version }} |
51 | 54 | asset_content_type: application/octet-stream |
52 | 55 | - name: Upload rpm package |
53 | 56 | id: upload-rpm |
|
56 | 59 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
57 | 60 | with: |
58 | 61 | 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 |
61 | 64 | asset_content_type: application/octet-stream |
62 | 65 | - name: Upload deb package |
63 | 66 | id: upload-deb |
|
66 | 69 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
67 | 70 | with: |
68 | 71 | 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 |
71 | 74 | asset_content_type: application/octet-stream |
0 commit comments