Skip to content

0.5.3

0.5.3 #21

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a tag is pushed
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Publish Package
on:
push:
tags: ['*']
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Node 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Write .npmrc file
run: |
echo //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }} > $HOME/.npmrc
echo @rundown-studio:registry=https://npm.pkg.github.com >> $HOME/.npmrc
- name: Install Dependencies
run: npm ci --loglevel=error
- name: Compile Typescript
run: npm run build
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Node 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Write .npmrc file
run: |
echo //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }} > $HOME/.npmrc
echo @rundown-studio:registry=https://npm.pkg.github.com >> $HOME/.npmrc
- name: Install Dependencies
run: npm ci --loglevel=error
- name: Run Unit Tests
run: npm run test:ci
env:
NODE_OPTIONS: --experimental-vm-modules
publish:
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Node 20
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com/
- name: Publish Package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}