Merge pull request #6 from GuicLuca/develop #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Package | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
strategy: | |
matrix: | |
toolchain: [stable, beta, nightly] | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
workdir: [RektBroker, RektCommon] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- name: Update toolchain | |
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
working-directory: ${{ matrix.workdir }} | |
- name: Build for ${{ matrix.os }} | |
run: cargo build --release | |
working-directory: ${{ matrix.workdir }} | |
- name: Create Zip File | |
run: zip -r ${{ matrix.workdir }}_${{ matrix.os }}.zip target/release/* | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ matrix.workdir }}_${{ matrix.os }} | |
path: ${{ matrix.workdir }}_${{ matrix.os }}.zip |