Publish Package #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
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 }} |