ci: upload to npm upon tag #9
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
on: push | ||
name: build and upload artifacts | ||
jobs: | ||
build: | ||
name: Build - ${{ matrix.platform.name }} | ||
strategy: | ||
matrix: | ||
platform: | ||
- name: Linux ${{ matrix.arch.name }} | ||
Check failure on line 11 in .github/workflows/build.yml
|
||
target: ${{ matrix.arch.name }}-unknown-linux-gnu | ||
os: linux | ||
output: libvenbind.so | ||
arch: | ||
- name: x86_64 | ||
- name: aarch64 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: cachix/install-nix-action@v26 | ||
- uses: cachix/cachix-action@v14 | ||
with: | ||
name: devenv | ||
- name: Install devenv.sh | ||
run: nix profile install nixpkgs#devenv | ||
- name: Build | ||
shell: devenv shell bash -- -e {0} | ||
run: | | ||
cargo build --release | ||
mkdir dist | ||
cp ./target/release/${{ matrix.platform.output }} ./dist/venbind-${{ matrix.platform.os }}-${{ matrix.arch.name }}.node | ||
- name: Upload | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.platform.os }}-${{ matrix.arch.name }} | ||
path: ./dist/venbind-${{ matrix.platform.os }}-${{ matrix.arch.name }}.node | ||