Meshery Schemas v0.8.134 #192
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 NPM Package | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| release_version: | |
| description: "Release Version" | |
| required: true | |
| default: "v1.0.0" | |
| type: string | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: read | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Required for OIDC trusted publishing | |
| contents: write | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: 'master' | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| registry-url: 'https://registry.npmjs.org' | |
| scope: "@meshery" | |
| - name: Install Dependencies | |
| run: npm ci | |
| env: | |
| NODE_AUTH_TOKEN: '' # Explicitly empty for install | |
| - name: Configure Git | |
| run: | | |
| git config user.name "${{ github.actor }}" | |
| git config user.email "${{ github.actor }}@users.noreply.github.com" | |
| - name: Update Release Version | |
| env: | |
| RELEASE_VERSION: ${{ inputs.release_version || github.event.release.tag_name }} | |
| run: | | |
| set -e | |
| OLD_VERSION=$(node -e "console.log(require('./package.json').version)") | |
| npm version "${RELEASE_VERSION}" --no-git-tag-version | |
| NEW_VERSION=$(node -e "console.log(require('./package.json').version)") | |
| echo "Updated Package Version" >> $GITHUB_STEP_SUMMARY | |
| echo "info Old Version: ${OLD_VERSION}" >> $GITHUB_STEP_SUMMARY | |
| echo "info New Version: ${NEW_VERSION}" >> $GITHUB_STEP_SUMMARY | |
| - name: Build Package | |
| run: | | |
| set -e | |
| npm run build | |
| echo "Build New Package" >> $GITHUB_STEP_SUMMARY | |
| - name: Publish Package | |
| run: | | |
| set -e | |
| npm publish --provenance --access public --verbose | |
| - name: Pull changes from remote | |
| run: git pull origin master | |
| - uses: stefanzweifel/git-auto-commit-action@v7 | |
| with: | |
| commit_message: Update schema | |
| commit_options: '--signoff' | |
| branch: master | |
| commit_user_name: meshery | |
| commit_user_email: ci@meshery.io | |
| commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
| token: ${{ secrets.MESHERY_CI }} | |