random-bunny/.forgejo/workflows/publish.yml
Ethan Lane 9417045972
All checks were successful
Stage / build (push) Successful in 18s
Stage / package (push) Successful in 27s
Split binaries
2025-01-14 18:47:08 +00:00

58 lines
No EOL
1.2 KiB
YAML

name: Publish to NPM
on:
push:
tags:
- '*'
jobs:
build:
runs-on: node
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn test
- run: yarn lint
package:
needs: build
runs-on: node
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn package
- name: Upload Linux Binary
uses: actions/upload-artifact@v3
with:
name: random-bunny-linux
path: bin/random-bunny-linux
if-no-files-found: error
- name: Upload Windows Binary
uses: actions/upload-artifact@v3
with:
name: random-bunny-win.exe
path: bin/random-bunny-win.exe
if-no-files-found: error
publish:
needs: package
runs-on: node
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: https://github.com/JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}