Skip to content

release-2024-07-01

release-2024-07-01 #4

Workflow file for this run

name: Publish Release
on:
release:
types: [released]
jobs:
publish:
runs-on: ubuntu-20.04
permissions:
contents: read
id-token: write
env:
working-directory: js-library
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- name: Install Dependencies
working-directory: ${{env.working-directory}}
run: npm ci
- name: Build
working-directory: ${{env.working-directory}}
run: npm run build
- name: Test
working-directory: ${{env.working-directory}}
run: npm test
- name: Set up npm
working-directory: ${{env.working-directory}}
run: printf '%s\n' '//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}' registry=https://registry.npmjs.org/ always-auth=true >> .npmrc
- name: Publish
working-directory: ${{env.working-directory}}
run: ./scripts/publish-npm.sh
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}