Skip to content

fix: add curly braces around if/for even for one statement (#14) #30

fix: add curly braces around if/for even for one statement (#14)

fix: add curly braces around if/for even for one statement (#14) #30

Workflow file for this run

name: Pre-build binaries
on:
push:
branches:
- main
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@v3
with:
go-version: "1.20.1"
- 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'
run: |
if [ -n "$(git status --porcelain -- prebuilds)" ]; then
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add prebuilds
git commit -m "build: add pre-build binary for $(uname -s | tr '[:upper:]' '[:lower:]')"
git pull --rebase
git push
fi