v0.1.4-alpha #5
Workflow file for this run
This file contains hidden or 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: On release CD to NPM | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
name: Build & Publish | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up node env | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install dependencies | |
# we need to install both the Angular project dependencies (e.g. @angular/cli), but also | |
# the library's specific distributional dependencies | |
run: | | |
npm ci | |
cd projects/console-forge | |
npm ci | |
- name: Build library | |
# note this happens in the root, thus relies on the root `package.json`'s build script | |
run: npm run build | |
- run: | | |
cd dist/console-forge | |
npm publish --provenance --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_APIKEY }} |