Release v35 Into Main #31
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: Build release | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| types: [closed] | |
| env: | |
| CI: true | |
| DEPLOYMENT_APP_ID: 957224 | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: read | |
| jobs: | |
| release: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| environment: production | |
| if: github.event.pull_request.merged | |
| steps: | |
| - name: Authenticate with GitHub App | |
| uses: actions/create-github-app-token@v1 | |
| id: app-token | |
| with: | |
| app-id: ${{ env.DEPLOYMENT_APP_ID }} | |
| private-key: ${{ secrets.DEPLOYMENT_APP_PRIVATE_KEY }} | |
| - name: Checkout Git repository | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| registry-url: https://registry.npmjs.org | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build release artifact | |
| run: pnpm run build | |
| - name: Get package version | |
| id: version | |
| run: | | |
| echo "VERSION=$(npm run --silent version)" >> $GITHUB_OUTPUT | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@latest | |
| env: | |
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
| with: | |
| commitish: ${{ github.ref }} | |
| tag_name: ${{ steps.version.outputs.VERSION }} | |
| release_name: ${{ steps.version.outputs.VERSION }} | |
| draft: false | |
| prerelease: false | |
| # Ensure npm 11.5.1 or later is installed - required for OIDC | |
| - name: Update npm | |
| run: npm install -g npm@latest | |
| - name: Publish package | |
| run: | | |
| cd packages/cli | |
| npm run publish |