v1.56.0 #369
Workflow file for this run
This file contains hidden or 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: Publish package on NPM | |
| permissions: | |
| contents: write | |
| id-token: write # Required for OIDC trusted publishing | |
| on: | |
| release: | |
| types: | |
| - prereleased | |
| - released | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 1 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Releasing tag ${{ github.event.release.tag_name }} | |
| run: | | |
| corepack enable; yarn | |
| # Get tag name from event | |
| tag_name="${{ github.event.release.tag_name }}" | |
| if [[ ! "$tag_name" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | |
| cd $(echo $tag_name | rev | cut -d'/' -f2- | rev) | |
| fi | |
| if [ "${{ github.event.release.prerelease }}" == "true" ]; then | |
| npm publish --provenance --access public --tag beta | |
| else | |
| npm publish --provenance --access public --tag latest | |
| fi | |
| env: | |
| COREPACK_ENABLE_DOWNLOAD_PROMPT: 0 |