Skip to content

Package publishing #108

Package publishing

Package publishing #108

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Package publishing
on:
workflow_dispatch:
# inputs:
# version:
# description: 'Version'
# required: false
# type: string
# release:
# types: [created]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20.x'
cache: 'yarn'
# - run: |
# cd ./external/console-gui-tools
# npm install
# npm run build
# cd ../..
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn test
- run: ./node_modules/.bin/codecov --token=${{secrets.codecov_token}}
publish-npm:
needs: ci
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: https://registry.npmjs.org/
# - run: |
# cd ./external/console-gui-tools
# npm install
# npm run build
# cd ../..
- run: yarn install --frozen-lockfile
- run: yarn build
- run: node ./src/utils/bump-package-json-version.cjs
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Bump version"
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}