Skip to content

v1.7.5

v1.7.5 #6

Workflow file for this run

name: Test
on:
release:
types:
- released
- prereleased
jobs:
build:
strategy:
matrix:
os:
- windows
- macos
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v3
name: Code checkout
with:
submodules: true
# Install basic tools
- uses: actions/setup-node@v3
name: Setup node.js
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/
- run: npm install --no-save --ignore-scripts
- run: npm run prebuildify -- -v
- name: Upload generate interface
uses: actions/upload-artifact@v3
with:
retention-days: 7
name: prebuilds_${{ matrix.os }}
path: "prebuilds/**"
pack_package:
needs: build
runs-on: ubuntu-latest
name: Pack npm package
env:
PACKAGE_VERSION: ${{ github.ref }}
steps:
- uses: actions/checkout@v3
name: Code checkout
with:
submodules: true
- name: Ubuntu dependecies
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt install -y binutils-multiarch gcc-*aarch64-linux-gnu gcc-*aarch64-linux-gnu-base g++-*aarch64-linux-gnu libc6-arm64-cross
# Install basic tools
- uses: actions/setup-node@v3
name: Setup node.js
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/
- name: Download all artefacts
uses: actions/download-artifact@v3
with:
path: ./prebuilds
name:
- name: Edit version and install depencies
run: |
sudo npm i -g semver
VERSION="$(semver -c ${{ github.ref_name }})"
echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV
jq --arg ver $VERSION '.version = $ver' package.json > package2.json
mv -fv package2.json package.json
# Install depencides and build
npm install --no-save
# Publish npm
- run: npm publish --access public --tag ${{ github.event.release.prerelease && 'next' || 'latest' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}