Skip to content

Commit

Permalink
Label build artifacts with x86_64 architecture in GitHub Actions work…
Browse files Browse the repository at this point in the history
…flow
  • Loading branch information
AliaSabur committed Oct 8, 2024
1 parent 2f724f9 commit ea9e438
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/compilation-guide/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
Expand All @@ -15,6 +16,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
architecture: [x86_64]
name: Build on ${{ matrix.os }} for ${{ matrix.architecture }}

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -48,18 +51,18 @@ jobs:
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
cd target/release
zip -r ../../build-${{ runner.os }}.zip *
zip -r ../../build-${{ runner.os }}-${{ matrix.architecture }}.zip *
working-directory: ${{ github.workspace }}

- name: Archive build artifacts on Windows
if: runner.os == 'Windows'
shell: pwsh
run: |
Compress-Archive -Path 'target\release\*' -DestinationPath "build-${{ runner.os }}.zip" -CompressionLevel Optimal -Force
Compress-Archive -Path 'target\release\*' -DestinationPath "build-${{ runner.os }}-${{ matrix.architecture }}.zip" -CompressionLevel Optimal -Force
working-directory: ${{ github.workspace }}

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.os }}
path: build-${{ runner.os }}.zip
name: build-${{ matrix.os }}-${{ matrix.architecture }}
path: build-${{ runner.os }}-${{ matrix.architecture }}.zip

0 comments on commit ea9e438

Please sign in to comment.