Skip to content

Node.js Package

Node.js Package #6

Workflow file for this run

name: Node.js Package
on:
workflow_dispatch:
jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- run: |
git config --global user.email "me@example.com"
git config --global user.name "me"
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
- run: yarn
- run: yarn build
- run: yarn test
- uses: google-github-actions/auth@v2
with:
workload_identity_provider: 'projects/236662580667/locations/global/workloadIdentityPools/ci-pool/providers/ls-github-actions'
service_account: 'github-actions@valued-clarity-241606.iam.gserviceaccount.com'
project_id: valued-clarity-241606
- run: npx google-artifactregistry-auth
- run: npm version $(jq -r '.version' package.json)-ls.$(git rev-parse --short HEAD)
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
CI: true
- run: git push --tags