From b75b0fa3336223b74567491aa535c76f8a3c2e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismael=20Gonz=C3=A1lez?= Date: Sat, 6 Nov 2021 18:55:06 +0100 Subject: [PATCH] Use cargo action in release workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ismael González --- .github/workflows/release.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 346fc74..211ff8c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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} @@ -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 }}/*"