random-bunny/.forgejo/workflows/publish.yml
Ethan Lane d85c812fbb
All checks were successful
Stage / build (push) Successful in 8s
Stage / rsync (push) Successful in 6s
Update forgejo actions workflow to rsync to the server on push to master/develop (#207)
- Update the forgejo actions workflow to rsync to the server on push to the master/develop branch

#204

Reviewed-on: #207
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-08-02 17:44:43 +01:00

38 lines
795 B
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
publish:
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
- run: cp -r ./bin ${{ secrets.PROD_REPO_PATH }}
- uses: https://github.com/JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}