Merge pull request #3168 from MatiasManevi:npm-workflow-dispatch

PiperOrigin-RevId: 882559989
Change-Id: Ia02f38e632dcd3064433b44f6e14427aa3b36735
This commit is contained in:
Copybara-Service
2026-03-12 06:43:37 -07:00
2 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -222,7 +222,7 @@ package_wasm() {
cp wasm/package.npm.json wasm/dist/package.json
cp wasm/README.md wasm/dist/README.md
VERSION=${GITHUB_REF#refs/tags/}
VERSION="${VERSION:-${GITHUB_REF#refs/tags/}}"
npm --prefix wasm/dist version "${VERSION}" --no-git-tag-version
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > ~/.npmrc
+12 -1
View File
@@ -5,6 +5,13 @@ on:
tags:
- '[0-9]*.[0-9]*.[0-9]*'
workflow_dispatch:
inputs:
tag_version:
description: 'Release tag version to deploy'
required: true
default: '0.0.0'
permissions:
id-token: write
contents: read
@@ -13,6 +20,10 @@ jobs:
publish:
name: Publish MuJoCo WASM package
runs-on: ubuntu-24.04
env:
VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_version || github.ref_name }}
steps:
- uses: actions/checkout@v3
@@ -36,5 +47,5 @@ jobs:
- name: Package WASM bindings
env:
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
GITHUB_REF: ${{ github.ref }}
VERSION: ${{ env.VERSION }}
run: bash ./.github/workflows/build_steps.sh package_wasm