-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This should avoid having to build from source for some more resource constrained platforms. Change-type: minor
- Loading branch information
Showing
3 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
name: publish binaries | ||
description: package GitHub release for node-pre-gyp | ||
# https://github.com/product-os/flowzone/tree/master/.github/actions | ||
inputs: | ||
json: | ||
description: 'JSON stringified object containing all the inputs from the calling workflow' | ||
required: true | ||
secrets: | ||
description: 'JSON stringified object containing all the secrets from the calling workflow' | ||
required: true | ||
variables: | ||
description: 'JSON stringified object containing all the variables from the calling workflow' | ||
required: true | ||
# --- custom environment | ||
NODE_VERSION: | ||
description: 'Node.js version' | ||
default: '18.x' | ||
|
||
RUST_TOOLCHAIN: | ||
description: 'Rust toolchain' | ||
default: 'stable' | ||
|
||
runs: | ||
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action | ||
using: 'composite' | ||
steps: | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.NODE_VERSION }} | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install Node modules | ||
shell: bash | ||
run: npm i | ||
# - name: Set up Rust targets | ||
# uses: dtolnay/rust-toolchain@master | ||
# with: | ||
# toolchain: ${{ inputs.RUST_TOOLCHAIN }} | ||
# targets: | | ||
# aarch64-unknown-linux-musl, | ||
# armv7-unknown-linux-musleabihf, | ||
# arm-unknown-linux-musleabihf, | ||
# x86_64-unknown-linux-musl, | ||
# i686-unknown-linux-musl | ||
- name: Set-up Rust armv6 target | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ inputs.RUST_TOOLCHAIN }} | ||
target: arm-unknown-linux-musleabihf | ||
override: true | ||
|
||
- name: Build armv6 target | ||
shell: bash | ||
run: npm run build:rust | ||
|
||
- name: Package the asset | ||
shell: bash | ||
# This will make a node-pre-gyp package. | ||
run: npx node-pre-gyp package |
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
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