v9.5.1 Add new errorCode 4 of NarrowcastProgressResponse #324
Workflow file for this run
This file contains 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: Release Node.js Package | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'The version to release' | |
required: true | |
jobs: | |
release-package: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Setup .npmrc file to publish to GitHub Packages | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm install | |
- name: Update version in package.json, package-lock.json, and lib/version.ts | |
run: | | |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | |
VERSION=${{ github.event.inputs.version }} | |
else | |
VERSION=${{ github.event.release.tag_name }} | |
fi | |
VERSION=${VERSION#v} | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
node ./scripts/update-version.mjs $VERSION | |
- run: npm run release | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_2 }} | |
- name: Create GitHub Issue on Failure | |
if: failure() | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const { owner, repo } = context.repo; | |
const version = process.env.VERSION; | |
const issueTitle = `Release job for ${version} failed`; | |
const issueBody = `The release job failed. Please check the [workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for more details.`; | |
const assignees = [context.actor]; | |
await github.rest.issues.create({ | |
owner, | |
repo, | |
title: issueTitle, | |
body: issueBody, | |
assignees | |
}); | |
deploy-docs: | |
needs: [release-package] | |
uses: ./.github/workflows/deploy-doc.yml |