v1.0.4 #7
Workflow file for this run
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: Release | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc | |
MACOSX_DEPLOYMENT_TARGET: '10.13' | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest | |
target: aarch64-apple-darwin | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
- os: ubuntu-latest | |
target: aarch64-unknown-linux-gnu | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.target }} | |
- name: Install gcc-aarch64-linux-gnu | |
if: matrix.os == 'ubuntu-latest' && matrix.target == 'aarch64-unknown-linux-gnu' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y gcc-aarch64-linux-gnu | |
- name: Build | |
run: cargo build -p native --release --target ${{ matrix.target }} | |
- name: Move Build | |
run: mv target/${{ matrix.target }}/release/native cjs-module-lexer-${{ matrix.target }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cjs-module-lexer-${{ matrix.target }} | |
path: cjs-module-lexer-${{ matrix.target }} | |
if-no-files-found: error | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
path: .artifact | |
- name: Gzip Artifact | |
run: gzip .artifact/* | |
- name: Publish Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: .artifact/cjs-module-lexer-*.gz |