Skip to content

release 3.0.0-alpha.3 (#28) #8

release 3.0.0-alpha.3 (#28)

release 3.0.0-alpha.3 (#28) #8

Workflow file for this run

name: publish
on:
push:
branches:
- main
paths:
- package.json
release:
types: [published]
env:
CI: true
node-version: 20
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: sudo /etc/init.d/mysql start
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
- run: sh sql/init-mysql.sh
- run: npm install
- run: npm test
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
name: Node ${{ env.node-version }}
with:
node-version: ${{ env.node-version }}
registry-url: https://registry.npmjs.org/
- uses: actions/checkout@v4
with:
fetch-depth: 0
# fetch-depth 0 needed by GitHub Release
- name: publish to NPM
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: GitHub Release
uses: justincy/[email protected]
id: release
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
registry-url: https://npm.pkg.github.com/
scope: '@nictool'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}