Skip to content

Commit

Permalink
Add GHA job to publish on npmjs
Browse files Browse the repository at this point in the history
  • Loading branch information
staltz committed May 16, 2024
1 parent 61f2950 commit 2fd4449
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/publish-npmjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish Package to npmjs
on: [push, pull_request]
# on:
# push:
# branches:
# - release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Set up nj-cli
run: cargo install nj-cli
- run: npm install
- run: rustup target add arm-linux-android
- run: rustup target add aarch64-linux-android
- run: rustup target add x86_64-linux-android
- run: rustup target add x86_64-apple-ios
- run: rustup target add aarch64-apple-ios
- name: Prebuild for Android armv7
run: npx prebuild-for-nodejs-mobile android-arm --sdk33 --verbose
- name: Prebuild for Android arm64
run: npx prebuild-for-nodejs-mobile android-arm64 --sdk33 --verbose
- name: Prebuild for Android x64
run: npx prebuild-for-nodejs-mobile android-x64 --sdk33 --verbose
- name: Prebuild for iOS arm64
run: npx prebuild-for-nodejs-mobile ios-arm64 --verbose
- name: Prebuild for iOS arm64 Simulator
run: npx prebuild-for-nodejs-mobile ios-arm64-simulator --verbose
- name: Prebuild for iOS x64 Simulator
run: npx prebuild-for-nodejs-mobile ios-x64-simulator --verbose

0 comments on commit 2fd4449

Please sign in to comment.