chore: release main (#55) #117
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: Release Please | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| id-token: write | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| release-please: | |
| name: Release please | |
| runs-on: ubuntu-latest | |
| outputs: | |
| any_release_created: ${{ steps.check_release.outputs.any_release_created }} | |
| steps: | |
| - uses: actions/create-github-app-token@v3 | |
| id: app-token | |
| with: | |
| client-id: ${{ secrets.CLIENT_ID }} | |
| private-key: ${{ secrets.PRIVATE_KEY }} | |
| - uses: googleapis/release-please-action@v5 | |
| id: release | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| target-branch: ${{ github.ref_name }} | |
| - name: Check if any package released | |
| id: check_release | |
| uses: actions/github-script@v9 | |
| env: | |
| PATHS_RELEASED: ${{ steps.release.outputs.paths_released }} | |
| with: | |
| script: | | |
| const pathsReleased = JSON.parse(process.env.PATHS_RELEASED); | |
| core.setOutput('any_release_created', pathsReleased.length > 0 ? 'true' : 'false'); | |
| publish-packages: | |
| name: Publish packages | |
| runs-on: ubuntu-latest | |
| needs: release-please | |
| if: needs.release-please.outputs.any_release_created == 'true' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Use pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Use Node.js 24.x | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'pnpm' | |
| - name: Install Dependencies | |
| run: pnpm --filter=!@jsonapi-serde/docs install | |
| - name: Build | |
| run: pnpm --filter=!@jsonapi-serde/docs -r build | |
| - name: Publish | |
| run: pnpm --filter=!@jsonapi-serde/docs -r publish --access public | |
| publish-docs: | |
| name: Publish docs | |
| needs: release-please | |
| if: needs.release-please.outputs.any_release_created == 'true' | |
| uses: ./.github/workflows/docs.yml | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write |