semver check, and making checks fail on moderate as well #32
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: Build | |
on: | |
push: | |
branches: [ "*" ] | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
jobs: | |
dependency-review: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout Repository' | |
uses: actions/checkout@v3 | |
- name: 'Dependency Review Push' | |
uses: actions/dependency-review-action@v3 | |
if: ${{ github.event_name == 'push'}} | |
with: | |
fail-on-severity: moderate | |
base-ref: ${{ github.event.before }} | |
head-ref: ${{ github.sha }} | |
- name: 'Dependency Review' | |
uses: actions/dependency-review-action@v3 | |
if: ${{ github.event_name != 'push'}} | |
with: | |
fail-on-severity: moderate | |
build-node-publish: | |
needs: dependency-review | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, macos-11, windows-2019] | |
node: [13.14.0, 14.0.0, 15.7.0, 16.13.1, 17.6.0, 18.8.0, 19.0.0] | |
architecture: [x64, ia32, arm64] | |
include: | |
- python_version: "3.10" | |
- architecture: ia32 | |
architecture_node: x86 | |
target_architecture: ia32 | |
- architecture: x64 | |
architecture_node: x64 | |
target_architecture: x64 | |
- architecture: arm64 | |
architecture_node: x64 | |
target_architecture: arm64 | |
extra_compile_flags: -arch arm64 | |
EXTRA_NODE_PRE_GYP_FLAGS: --target_arch=arm64 | |
exclude: | |
- os: ubuntu-20.04 | |
architecture: arm64 | |
- os: windows-2019 | |
architecture: arm64 | |
- os: macos-11 | |
architecture: ia32 | |
- os: ubuntu-20.04 | |
architecture: ia32 | |
- os: macos-11 | |
node: 13.14.0 | |
architecture: arm64 | |
- os: macos-11 | |
node: 14.0.0 | |
architecture: arm64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
architecture: ${{ matrix.architecture_node }} | |
- run: node --version | |
- run: npm --version | |
- run: npm config set msbuild_path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe" | |
if: ${{ runner.os == 'Windows' }} | |
- run: npm install --build-from-source | |
env: | |
npm_config_arch: ${{ matrix.architecture }} | |
npm_config_python: python${{ matrix.python_version }} | |
npm_config_target_arch: ${{ matrix.target_architecture }} | |
CFLAGS: ${{ matrix.extra_compile_flags }} | |
CPPFLAGS: ${{ matrix.extra_compile_flags }} | |
- run: npm test | |
if: ${{ matrix.target_architecture != 'arm64' }} | |
- run: ./node_modules/.bin/node-pre-gyp package testpackage --target_arch=${{ matrix.target_architecture }} | |
if: ${{ matrix.target_architecture != 'arm64' }} | |
- run: ./node_modules/.bin/node-pre-gyp package --target_arch=${{ matrix.target_architecture }} | |
if: ${{ matrix.target_architecture == 'arm64' }} | |
- run: ./node_modules/.bin/node-pre-gyp unpublish publish --target_arch=${{ matrix.target_architecture }} | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[publish binary]')}} | |
env: | |
AWS_ACCESS_KEY_ID: ${{secrets.NODE_PRE_GYP_ACCESSKEYID}} | |
AWS_SECRET_ACCESS_KEY: ${{secrets.NODE_PRE_GYP_SECRETACCESSKEY}} |