Skip to content

Commit

Permalink
Use cargo action in release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Ismael González <[email protected]>
  • Loading branch information
ismaelgv committed Nov 6, 2021
1 parent 736778d commit b75b0fa
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ jobs:
override: true

- name: Build
shell: bash
run: |
cargo build --target=${TARGET} --release --verbose
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args:: --target=${TARGET} --release --verbose

- name: Create package
id: package
Expand All @@ -74,10 +76,10 @@ jobs:
cp LICENSE "${deploy_dir}"
# Archive
pushd "${tempdir}"
pushd "${BUILD_DIR}"
tar czf "${GITHUB_WORKSPACE}/${package_name}${ext}" "${package_name}"/*
popd
rm -r "${tempdir}"
rm -r "${BUILD_DIR}"
echo ::set-output name=name::${package_name}${ext}
Expand All @@ -101,10 +103,11 @@ jobs:
- name: Fetch artifacts
uses: actions/download-artifact@v2
with:
name: artifacts
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ARTIFACT_NAME }}/

- name: Publish new release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.version.outputs.version }}
artifacts: ${{ env.ARTIFACT_NAME }}
artifacts: "${{ env.ARTIFACT_NAME }}/*"

0 comments on commit b75b0fa

Please sign in to comment.