Skip to content

0.11.1

0.11.1 #120

Workflow file for this run

# Creates and publishes assets for a new release.
name: Publish
on:
release:
types:
- created # triggered by Bump Version creating a release
workflow_dispatch:
jobs:
publish-github:
runs-on: ${{ matrix.system.os }}
strategy:
fail-fast: false
matrix:
node_version:
- 20
- 22
- 24
system:
- os: macos-13
target: x86_64-apple-darwin
arch: x64
- os: ubuntu-24.04
target: x86_64-unknown-linux-gnu
arch: x64
- os: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
arch: arm64
- os: windows-2025
target: x86_64-pc-windows-msvc
arch: x64
- os: macos-14
target: aarch64-apple-darwin
arch: arm64
steps:
- uses: actions/checkout@v5
with:
ref: ${{ github.event.release.tag_name }}${{ github.event.inputs.name }}
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
architecture: ${{ matrix.system.arch }}
cache: yarn
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.system.target }}
override: true
- name: Install modules
run: yarn install --ignore-scripts
- name: Build
id: build
# Use bash, even on Windows.
shell: bash
env:
PRE_GYP_PLATFORM: ${{ matrix.system.pre_gyp_platform }}
PRE_GYP_ARCH: ${{ matrix.system.pre_gyp_arch }}
CARGO_BUILD_TARGET: ${{ matrix.system.target }}
run: |
node build.js
cd bin-package
echo "asset=$(echo *.tar.gz)" >> "$GITHUB_OUTPUT"
- name: Upload release asset
run: gh release upload ${{ github.event.release.tag_name }}${{ github.event.inputs.name }} bin-package/${{ steps.build.outputs.asset }} --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Release musl binaries
publish-github-docker:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# These Node versions should match those above in the `publish-github` job.
node_version:
- 20
- 22
- 24
os:
- ubuntu-24.04
- ubuntu-24.04-arm
fail-fast: false
steps:
- uses: actions/checkout@v5
- name: Build
run: docker build --build-arg NODE_VERSION=${{matrix.node_version}} --output type=local,dest=./host-artifacts .
- name: Output
id: asset
run: |
cd host-artifacts/out
echo "asset=$(echo *.tar.gz)" >> "$GITHUB_OUTPUT"
- name: Upload release asset
run: |
git config --global --add safe.directory $(pwd)
gh release upload ${{ github.event.release.tag_name }}${{ github.event.inputs.name }} host-artifacts/out/${{ steps.asset.outputs.asset }} --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-npm:
needs:
- publish-github
- publish-github-docker
uses: IronCoreLabs/workflows/.github/workflows/typescript-release.yaml@typescript-release-v1
with:
pre_publish_steps: "./build.js"
publish_working_directory: "dist"
secrets: inherit