v1.8.2 #53
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: Automated deploy | |
on: | |
release: | |
types: [created] | |
env: | |
VERSION: ${{ github.event.release.tag_name }} | |
TARGET_REF: ${{ github.event.release.target_commitish }} | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: macos-11 | |
node_arch: x64 | |
command: build:gyp | |
args: --arch x64+arm64 | |
- os: windows-2019 | |
node_arch: x86 | |
command: build:gyp | |
- os: windows-2019 | |
node_arch: x64 | |
command: build:gyp | |
- os: ubuntu-20.04 | |
command: build:gyp-cross | |
args: -i centos7-devtoolset7 -i alpine | |
- os: ubuntu-20.04 | |
command: build:gyp-cross | |
args: -i linux-arm64-lts -i linux-armv7 -i linux-armv6 | |
- os: ubuntu-20.04 | |
command: build:gyp-cross | |
args: --tag-libc musl -i linux-arm64-musl | |
- os: ubuntu-20.04 | |
command: build:gyp-cross | |
args: -i android-arm64 -i android-armv7 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ env.TARGET_REF }} | |
token: ${{ secrets.GPR_TOKEN }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
architecture: ${{ matrix.node_arch }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Prebuild package | |
run: npm run ${{ matrix.command }} -- ${{ matrix.args }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: build-artifacts | |
path: prebuilds/ | |
if-no-files-found: error | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ env.TARGET_REF }} | |
token: ${{ secrets.GPR_TOKEN }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: 'https://registry.npmjs.org' | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build-artifacts | |
path: prebuilds | |
- name: Install dependencies | |
run: npm ci | |
- name: Publish to npm | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@NeuraLegion' | |
- name: Publish to GPR | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GPR_TOKEN }} |