Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/package-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.SDK_GH_BOT1_TOKEN }}
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 24
cache: 'yarn'
- name: Check if the release branch exists
run: |
Expand Down Expand Up @@ -57,13 +60,14 @@ jobs:
yarn install
yarn build
- name: Publish to npm
env:
NPM_TAG: ${{ github.event.inputs.npm_tag }}
run: |
cd ./dist
echo "//registry.npmjs.org/:_authToken=${{ secrets.npm_token }}" > .npmrc
if [ -z "${{ github.event.inputs.npm_tag }}" ]; then
npm publish --access=public
if [ -z "$NPM_TAG" ]; then
npm publish --access=public --provenance
else
npm publish --tag ${{ github.event.inputs.npm_tag }} --access=public
npm publish --tag "$NPM_TAG" --access=public --provenance
echo "npm_tag is provided; Skipping the rest of the steps."
echo "SKIP_REST=true" >> $GITHUB_ENV
fi
Expand Down
Loading