Skip to content

feat: prepare package for publishing #6

feat: prepare package for publishing

feat: prepare package for publishing #6

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:x64 && npm run build:arm64
# else
npm run build
# fi
- name: Test
run: npm test
- name: Commit pre-built binary
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:]')/$(uname -m)"
git push
fi