Skip to content

v0.1.0

v0.1.0 #20

Workflow file for this run

name: fits/publish
on:
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [22]
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
# Setup .npmrc file to publish to GitHub Packages
- name: Setup node env 🏗 and .npmrc file to publish to GitHub Packages
uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
registry-url: 'https://npm.pkg.github.com'
# Defaults to the user or organization that owns the workflow file:
scope: '@observerly'
- name: Cache node_modules 📦
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install pnpm globally
run: npm install -g [email protected]
- name: Install project dependencies 👨🏻‍💻
run: pnpm install
- name: Build the package ready for publishing
run: pnpm run build
- name: Publish to NPM 📦
uses: JS-DevTools/npm-publish@v3
with:
registry: 'https://registry.npmjs.org/'
access: 'public'
token: ${{ secrets.NPM_OBSERVERLY_PUBLIC_TOKEN }}