v26.0.0 #194
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: 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}} |