Skip to content

v1.0.0

v1.0.0 #1

Workflow file for this run

# 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://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Publish GPR
on:
release:
types:
- created
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Lint code
run: npm run lint
- name: Run unit tests
run: npm test
- name: Upload dist folder
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download dist folder
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
registry-url: https://npm.pkg.github.com
- name: Publish to GitHub Package Repository
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}