From 5772f60d21e89a3d786fe96695ec36a82c71c85d Mon Sep 17 00:00:00 2001 From: Revertron <105154+Revertron@users.noreply.github.com> Date: Tue, 23 Feb 2021 16:10:12 +0100 Subject: [PATCH] Update rust_create_release.yml --- .github/workflows/rust_create_release.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust_create_release.yml b/.github/workflows/rust_create_release.yml index 28e0c01..b62ed38 100644 --- a/.github/workflows/rust_create_release.yml +++ b/.github/workflows/rust_create_release.yml @@ -44,13 +44,13 @@ jobs: draft: true prerelease: true - upload: + build-and-upload: name: Create and upload builds needs: [ make_release, get_version ] runs-on: ${{ matrix.os }} strategy: matrix: - os: [ windows-latest ] + os: [ windows-latest, ubuntu-latest, macOS-latest ] defaults: run: @@ -64,19 +64,28 @@ jobs: - name: Build release binary run: | cargo build --release + - name: win_arch + run: echo "BIN_ARCH=windows-amd64" >> $GITHUB_ENV + if: contains(matrix.os, 'windows') + - name: lin_arch + run: echo "BIN_ARCH=linux-amd64" >> $GITHUB_ENV + if: contains(matrix.os, 'ubuntu') + - name: mac_arch + run: echo "BIN_ARCH=darwin-amd64" >> $GITHUB_ENV + if: contains(matrix.os, 'mac') - name: Fill variables run: | echo "BIN_PATH=./target/release/alfis" >> $GITHUB_ENV - echo "ZIP_NAME=alfis_${{ needs.get_version.outputs.project_version }}.zip" >> $GITHUB_ENV + echo "ZIP_NAME=alfis-${{env.BIN_ARCH}}-v${{ needs.get_version.outputs.project_version }}.zip" >> $GITHUB_ENV - name: Windows variables if: contains(matrix.os, 'windows') run: | echo "BIN_PATH=target/release/alfis.exe" >> $GITHUB_ENV - echo "ZIP_NAME=alfis_${{ needs.get_version.outputs.project_version }}.zip" >> $GITHUB_ENV + echo "ZIP_NAME=alfis-${{env.BIN_ARCH}}-v${{ needs.get_version.outputs.project_version }}.zip" >> $GITHUB_ENV - name: Packaging uses: papeloto/action-zip@v1 with: - files: ${{ env.BIN_PATH }} alfis.cfg + files: ${{ env.BIN_PATH }} alfis.cfg README.md LICENSE dest: ${{ env.ZIP_NAME }} - name: Upload binary id: upload-binary