ci: extract publish workflow for manual releases (#60) #20
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 | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| branch: | |
| description: Branch to create the release from | |
| required: true | |
| default: main | |
| prerelease: | |
| description: Create a pre-release | |
| type: boolean | |
| default: false | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| release-please: | |
| name: Release Please | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| steps: | |
| - uses: actions/create-github-app-token@v2 | |
| id: app-token | |
| with: | |
| app-id: ${{ secrets.APP_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| - uses: googleapis/release-please-action@v4 | |
| id: release | |
| with: | |
| config-file: .release-please-config.json | |
| manifest-file: .release-please-manifest.json | |
| token: ${{ steps.app-token.outputs.token }} | |
| target-branch: ${{ inputs.branch || github.ref_name }} | |
| prerelease: ${{ inputs.prerelease }} | |
| publish: | |
| needs: [release-please] | |
| if: needs.release-please.outputs.release_created | |
| permissions: | |
| id-token: write | |
| uses: ./.github/workflows/publish.yml | |
| with: | |
| tag: ${{ needs.release-please.outputs.tag_name }} |