Skip to content

Publish Test Version #9

Publish Test Version

Publish Test Version #9

Workflow file for this run

name: Publish Test Version
on:
# Allows triggering the workflow manually
workflow_dispatch:
inputs:
version:
description: "Build and publish to NPM"
required: true
default: "3.9.0"
tag:
description: "Tag to apply to the release"
required: true
default: "test.1"
# We're going to interact with GH from the pipelines, so we need to get some permissions
permissions:
contents: read # for checkout
jobs:
release:
name: Build and Publish ${{ github.event.inputs.version }}-${{ github.event.inputs.tag }}
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
# Semantic release requires this as bare minimum
node-version: 24
- name: Install dependencies
run: npm install
- name: Setup npm auth
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Set version to ${{ github.event.inputs.version }}-${{ github.event.inputs.tag }}
run: |
set -x
npm version ${{ github.event.inputs.version }}-${{ github.event.inputs.tag }} --no-git-tag-version
- name: Build the SDK for release
run: |
npm run build
- name: Publish to NPM - ${{ github.event.inputs.version }}-${{ github.event.inputs.tag }}
run: |
npm publish --tag ${{ github.event.inputs.tag }}