Skip to content

build!: bump minimum supported Node.js to 18 #46

build!: bump minimum supported Node.js to 18

build!: bump minimum supported Node.js to 18 #46

Workflow file for this run

name: Pre-build binaries
on:
push:
branches: ["**"]
pull_request:
branches: [main]
permissions:
contents: write
jobs:
prebuild:
strategy:
matrix:
runner:
- ubuntu-latest
- macos-12
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-node@v3
with:
node-version: "18.x"
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: actions/setup-go@v4
with:
go-version: "1.19.13"
- name: Install
run: npm install --ignore-scripts
- name: Build
run: |
if [[ "$RUNNER_OS" == "macOS" ]]; then
npm run build:arm64 && npm run build:x64
else
npm run build
npm test
fi
- name: Commit pre-built binary
if: (github.event_name == 'pull_request' || (github.event_name == 'push' && contains(github.event.head_commit.message, 'CI=pre-build')))
run: |
if [ -n "$(git status --porcelain -- prebuilds)" ]; then
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add prebuilds
git commit -m "build: add pre-build binary for $(uname -s | tr '[:upper:]' '[:lower:]')"
git pull --rebase
git push
fi