Skip to content

convert from commonjs to es6/ecma modules #5

convert from commonjs to es6/ecma modules

convert from commonjs to es6/ecma modules #5

Workflow file for this run

name: publish
on:
push:
branches:
- main
paths:
- package.json
release:
types: [published]
env:
CI: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: sudo /etc/init.d/mysql start
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- 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/github-action-npm-release@2.0.1
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 }}