This commit is contained in:
Alexandr Bogomyakov
2020-04-26 04:07:45 +03:00
parent edc47c2832
commit ccc216af97

View File

@ -10,8 +10,6 @@ jobs:
name: Upload Release Asset name: Upload Release Asset
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Setting version
run: ver=$(grep -m1 version Cargo.toml | awk '{gsub("\"", "", $NF); print $NF}')
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Pre-build - name: Pre-build
@ -20,7 +18,7 @@ jobs:
- name: Build binary - name: Build binary
run: cargo build --release run: cargo build --release
- name: Build deb - name: Build deb
run: cargo deb --output ./target/debian/mus-fuse_${ver}_amd64.deb run: cargo deb --output ./target/debian/mus-fuse_amd64.deb
- name: Create Release - name: Create Release
id: create_release id: create_release
uses: actions/create-release@v1 uses: actions/create-release@v1
@ -39,7 +37,7 @@ jobs:
with: with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./target/release/mus-fuse asset_path: ./target/release/mus-fuse
asset_name: mus-fuse-${{ ver }} asset_name: mus-fuse
asset_content_type: application/x-pie-executable asset_content_type: application/x-pie-executable
- name: Upload Release Deb - name: Upload Release Deb
id: upload-release-asset-deb id: upload-release-asset-deb
@ -48,6 +46,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./target/debian/mus-fuse*.deb asset_path: ./target/debian/mus-fuse_amd64.deb
asset_name: mus-fuse_${ver}_amd64.deb asset_name: mus-fuse_amd64.deb
asset_content_type: application/vnd.debian.binary-package asset_content_type: application/vnd.debian.binary-package