Skip to content

Release @doist/reactist package #177

Release @doist/reactist package

Release @doist/reactist package #177

Workflow file for this run

name: Release @doist/reactist package
on:
release:
types: [created]
workflow_dispatch:
permissions:
# Enable the use of OIDC for npm provenance
id-token: write
# Enable the use of GitHub Packages registry
contents: read
packages: write
jobs:
publish:
runs-on: ubuntu-latest
# Based on historical data
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Read Node.js version from '.nvmrc'
id: nvmrc
run: |
echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
- uses: actions/setup-node@v1
with:
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }}
# Remove any registry configurations from .npmrc
- run: sed -i "/@doist/d" ./.npmrc
- run: npm ci
- run: npm run lint
- run: npm run type-check
- run: npm test
# Build artifacts for publishing
- run: npm run build
# Publish to GitHub package registry
- uses: actions/setup-node@v1
with:
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }}
registry-url: https://npm.pkg.github.com/
scope: '@doist'
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
# Publish to npm registry
- uses: actions/setup-node@v1
with:
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }}
registry-url: https://registry.npmjs.org/
scope: '@doist'
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}