0.4.4 #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: Install Dependencies | |
# run: npm ci --loglevel=error | |
# - name: Run Unit Tests | |
# run: npm run test:ci | |
# env: | |
# NODE_OPTIONS: --experimental-vm-modules | |
publish: | |
needs: build | |
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 }} | |