Skip to content

v0.9.0

v0.9.0 #17

name: Publish to npm registry
on:
workflow_dispatch:
release:
types: [published]
env:
node-version: 20.x
working-directory: ./code
jobs:
test:
name: Run type checking & tests
runs-on: ubuntu-latest
concurrency:
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}'
cancel-in-progress: true
steps:
- name: Checkout the Git repository
uses: actions/checkout@v4
- name: Use Node.js ${{ env.node-version }}
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.node-version }}
- name: Install Node modules
uses: ./.github/actions/install-node-modules
- name: Run tests (Vitest)
uses: ./.github/actions/run-tests
build:
name: Build & publish package
runs-on: ubuntu-latest
needs: test
concurrency:
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}'
cancel-in-progress: true
permissions:
contents: read
packages: write
steps:
- name: Checkout the Git repository
uses: actions/checkout@v4
- name: Use Node.js ${{ env.node-version }}
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.node-version }}
registry-url: 'https://registry.npmjs.org'
scope: '@wolfpackthatcodes'
- name: Install Node modules
uses: ./.github/actions/install-node-modules
- name: Build npm package
uses: ./.github/actions/build-npm-package
- name: Publish the package to npm registry
uses: ./.github/actions/publish-npm-package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}