Skip to content

Publish Package

Publish Package #14

Workflow file for this run

name: Publish Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: 22
# check if caches can be added
# cache: 'yarn'
# cache-dependency-path: 'yarn.lock'
registry-url: 'https://registry.npmjs.org'
# Defaults to the user or organization that owns the workflow file
scope: '@sitegeist'
# check if cache really needs cleaning
# - run: yarn cache clean --all
- run: yarn set version 4.5.0 # see if can be ommited
- run: |
yarn config set npmScopes.sitegeist.npmRegistryServer "https://registry.npmjs.org"
yarn config set npmScopes.sitegeist.npmAlwaysAuth true
yarn config set npmScopes.sitegeist.npmAuthToken $NODE_AUTH_TOKEN
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: yarn install
- run: yarn build
- run: yarn npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}