Skip to content

[Issue #50]: Publish spec to npm via GitHub action #6

[Issue #50]: Publish spec to npm via GitHub action

[Issue #50]: Publish spec to npm via GitHub action #6

Workflow file for this run

name: CI - Publish @common-grants/core (dry run)
on:
pull_request:
branches:
- main
paths:
- "specs/**" # Trigger only if files in the `specs/` directory are changed
- ".github/workflows/ci-specs-npm.yml"
defaults:
run:
working-directory: ./specs
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- name: Dry run publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --tag alpha --access public --dry-run