Skip to content

v0.31.0

v0.31.0 #27

Workflow file for this run

name: Release
on:
release:
types: [published]
env:
npm_config_build_from_source: true
jobs:
publish:
name: Publish package
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
cache: yarn
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Publish to NPM
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
build:
strategy:
matrix:
os: [ubuntu-20.04, macos-11, windows-2019]
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
cache: yarn
node-version: 16
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Package artifacts
run: yarn node-pre-gyp package
- name: Upload to Release
uses: csexton/release-asset-action@v2
with:
pattern: build/stage/**/argon2*.tar.gz
github-token: ${{ secrets.GITHUB_TOKEN }}
release-url: ${{ github.event.release.upload_url }}
build-alpine:
name: Build on Alpine Linux
runs-on: ubuntu-latest
container:
image: node:16-alpine
steps:
- name: Install build deps
run: apk add make g++ python3 git
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Package artifacts
run: yarn node-pre-gyp package
- name: Upload to Release
uses: csexton/release-asset-action@v2
with:
pattern: build/stage/**/argon2*.tar.gz
github-token: ${{ secrets.GITHUB_TOKEN }}
release-url: ${{ github.event.release.upload_url }}
build-arm:
name: Build on arm64
runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch: aarch64
distro: ubuntu20.04
- arch: aarch64
distro: alpine_latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- uses: uraimo/[email protected]
name: Package artifacts
id: build
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
setup: mkdir -p "${PWD}/artifacts"
dockerRunArgs: --volume "${PWD}:/repo"
env: |
npm_config_build_from_source: true
install: |
case "${{ matrix.distro }}" in
ubuntu*|jessie|stretch|buster)
apt-get update -y
apt-get install -y curl
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
apt-get install -y make g++ python nodejs
npm install --global yarn
;;
alpine*)
apk add --update make g++ python3
apk add --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/v3.13/main/ nodejs~=16 npm~=16
npm install --global yarn
;;
esac
run: |
cd /repo
yarn install --frozen-lockfile
yarn node-pre-gyp package
- name: Upload to Release
uses: csexton/release-asset-action@v2
with:
pattern: build/stage/**/argon2*.tar.gz
github-token: ${{ secrets.GITHUB_TOKEN }}
release-url: ${{ github.event.release.upload_url }}
build-freebsd:
name: Build on FreeBSD
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- uses: vmactions/freebsd-vm@v0
name: Package artifacts
with:
envs: 'npm_config_build_from_source'
prepare: |
pkg install -y gmake python3 yarn-node16
run: |
yarn install --frozen-lockfile
yarn node-pre-gyp package
sync: sshfs
- name: Upload to Release
uses: csexton/release-asset-action@v2
with:
pattern: build/stage/**/argon2*.tar.gz
github-token: ${{ secrets.GITHUB_TOKEN }}
release-url: ${{ github.event.release.upload_url }}