diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 28afb32b..00000000 --- a/.appveyor.yml +++ /dev/null @@ -1,25 +0,0 @@ -environment: - NODEJS_VERSION: "10" - PREBUILD_UPLOAD: - secure: oNyyLE7/Oq3TUGZPz6DkLFPUuQzc8FiFS1iuPp7LZ2fyOP/UF4Np4NzJmWcXVyY/ - -platform: - - x64 - - x86 - -install: - - ps: Install-Product node $env:NODEJS_VERSION $env:Platform - - git submodule update --init --recursive - - npm install - -build: off - -test_script: - - npm test - -branches: - only: - - master - - /^v.*$/ - -deploy_script: IF "%APPVEYOR_REPO_TAG%" == "true" (npm run prebuild && npm run prebuild:upload -u %PREBUILD_UPLOAD%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..042bac9d --- /dev/null +++ b/.github/workflows/build.yml @@ -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 }}