Skip to content

change to on push

change to on push #18

Workflow file for this run

name: Dynamic libs
on:
push:
tags:
- '**'
jobs:
publish_dlibs:
name: Publish the dynamic libraries
strategy:
matrix:
platform:
- os_name: macos-aarch64
os: macos-latest
target: aarch64-apple-darwin
lib_name: libwasmer_jni.dylib
zip_name: macos-aarch64.zip
- os_name: macos-x86_64
os: macos-latest
target: x86_64-apple-darwin
lib_name: libwasmer_jni.dylib
zip_name: macos-x86_64.zip
- os_name: linux-x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
lib_name: libwasmer_jni.so
zip_name: linux-x86_64.zip
- os_name: linux-aarch64
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
lib_name: libwasmer_jni.so
zip_name: linux-aarch64.zip
- os_name: windows
os: windows-latest
target: x86_64-pc-windows-msvc
lib_name: libwasmer_jni.dll
zip_name: windows.zip
runs-on: ${{ matrix.platform.os }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
- name: Create the dynamic libs
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
rustup target add ${{ matrix.platform.target }}
cargo build --release --target=${{ matrix.platform.target }}
ls
ls target
echo ---------------------------
ls target/${{ matrix.platform.target }}/release
- name: Archive dynamic lib
uses: thedoctor0/zip-release@0.7.5
with:
type: 'zip'
filename: ${{ matrix.platform.zip_name }}
path: ./target/${{ matrix.platform.target }}/release/${{ matrix.platform.lib_name }}
- name: Release
uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.platform.zip_name }}