dist js #14
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: dist js | |
on: | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
if: "startsWith(github.ref, 'refs/tags/')" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-latest, windows-latest, ubuntu-20.04 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: hustcer/setup-nu@v3 | |
with: | |
version: '0.95.0' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.target }} | |
- if: "matrix.os == 'macos-latest'" | |
run: | | |
nu -n -c "use action.nu *; build js aarch64-apple-darwin x86_64-apple-darwin" | |
env: | |
MACOSX_DEPLOYMENT_TARGET: 10.11 | |
- if: "matrix.os == 'windows-latest'" | |
run: | | |
nu -n -c "use action.nu *; rustup override set 1.75.0; build js x86_64-pc-windows-msvc i686-pc-windows-msvc" | |
- if: "matrix.os == 'ubuntu-20.04'" | |
run: | | |
nu -n -c "overlay use action.nu; build js x86_64-unknown-linux-gnu" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ipmb-js | |
path: | | |
ipmb-js/*/release/ipmb_js.node | |
target/*.zip | |
target/*.pdb | |
dist: | |
needs: | |
- build | |
if: "startsWith(github.ref, 'refs/tags/')" | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: hustcer/setup-nu@v3 | |
with: | |
version: '0.95.0' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ipmb-js | |
- uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
target/*.zip | |
target/*.pdb | |
- run: | | |
nu -n -c "use action.nu *; dist js" | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |