Skip to content

Releasing next version on NPM πŸš€ #11

Releasing next version on NPM πŸš€

Releasing next version on NPM πŸš€ #11

Workflow file for this run

name: NPM Publish
run-name: Releasing next version on NPM πŸš€
on:
release:
types: [published]
jobs:
npm-publish:
runs-on: ubuntu-latest
environment: release
permissions:
contents: read
id-token: write
defaults:
run:
working-directory: ./typescript
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
cache: "npm"
cache-dependency-path: "./typescript/package-lock.json"
- uses: arduino/setup-protoc@v3
with:
version: "25.2"
- name: Build and publish to NPM
run: |
npm ci
npm run proto
npm run tsc
npm --no-git-tag-version --force version from-git
npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}