wip: macos ci release #9
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: CI (MacStadium) | |
on: | |
- push | |
- pull_request | |
permissions: {} | |
jobs: | |
CI: | |
permissions: | |
contents: write # for npx prebuild to make release | |
name: Node.js ${{ matrix.nodejs_version }} ${{ matrix.nodejs_arch }} ${{ matrix.prebuild && '- prebuild' }} | |
runs-on: macos-14 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- nodejs_version: 14 | |
nodejs_arch: x64 | |
- nodejs_version: 18 | |
nodejs_arch: arm64 | |
prebuild: true | |
defaults: | |
run: | |
shell: /usr/bin/arch -arch arm64e /bin/bash -l {0} | |
steps: | |
- name: Dependencies (Node.js) | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.nodejs_version }} | |
architecture: ${{ matrix.nodejs_arch }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install | |
run: npm install --build-from-source --unsafe-perm | |
- name: Test | |
run: npm test | |
- name: Prebuild | |
if: matrix.prebuild && startsWith(github.ref, 'refs/tags/') | |
env: | |
prebuild_upload: ${{ secrets.GITHUB_TOKEN }} | |
run: npx prebuild --runtime napi --target 7 |