Release v2.0.0-alpha2 #1
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: Compile Rust Library | |
on: | |
push: | |
branches: [ "*" ] | |
pull_request: | |
branches: [ "*" ] | |
jobs: | |
build: | |
name: Build on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-latest, windows-latest ] | |
include: | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
targets: ${{ matrix.target }} | |
- name: Run Cargo Test | |
run: cargo test --target ${{ matrix.target }} | |
shell: bash | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'latest' | |
- name: Install dependencies | |
run: npm ci --include=dev | |
- name: Build for ${{ matrix.os }} | |
run: | | |
if [ "${{ matrix.os }}" == "macos-latest" ]; then | |
npm run release:mac | |
else | |
npm run release:win | |
fi | |
shell: bash | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: scarlet-${{ matrix.os }} | |
path: | | |
dist/*.dmg | |
dist/*.exe | |
dist/*.zip | |
if-no-files-found: error |