Skip to content

Commit

Permalink
Replace AppVeyor with GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
verhovsky committed Mar 9, 2023
1 parent 78329b2 commit 98276a6
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 25 deletions.
25 changes: 0 additions & 25 deletions .appveyor.yml

This file was deleted.

83 changes: 83 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: build

on:
push:
branches:
- master
pull_request:
branches:
- master
release:
types:
- released

jobs:

test:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node:
- 14
- 16
- 18
fail-fast: false
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm test

publish:
if: ${{ github.event_name == 'release' }}
name: Publishing to NPM
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

prebuild:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
name: Prebuild on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: publish
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install --ignore-scripts
- run: npx --no-install prebuild -r node -t 10.0.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 -t 18.0.0 -u ${{ secrets.GITHUB_TOKEN }}
- run: npx --no-install prebuild -r electron -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 -u ${{ secrets.GITHUB_TOKEN }}
- if: matrix.os == 'windows-latest'
run: npx --no-install prebuild -r electron -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch ia32 -u ${{ secrets.GITHUB_TOKEN }}
- if: matrix.os == 'macos-latest'
run: npx --no-install prebuild -r electron -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch arm64 -u ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 98276a6

Please sign in to comment.