@@ -11,21 +11,43 @@ permissions:
1111 # npm-publish is dispatched explicitly below. workflow_dispatch is one of the
1212 # few events that always creates a run, even from GITHUB_TOKEN.
1313 actions : write
14+
15+ concurrency :
16+ group : release-please
17+ cancel-in-progress : false
18+
1419jobs :
1520 release-please :
1621 runs-on : ubuntu-latest
1722 steps :
1823 - uses : googleapis/release-please-action@v5
19- id : release
24+ id : prerelease
25+ with :
26+ token : ${{ secrets.GITHUB_TOKEN }}
27+ config-file : .github/prerelease-config.json
28+ manifest-file : .github/prerelease-manifest.json
29+ target-branch : ${{ github.ref_name }}
30+
31+ # Once an RC PR is merged and tagged, replace it with the stable Release
32+ # PR. The stable config also synchronizes the prerelease manifest when
33+ # that stable PR is eventually merged.
34+ - name : create stable Release PR
35+ if : >-
36+ steps.prerelease.outputs.releases_created == 'true' &&
37+ contains(steps.prerelease.outputs.tag_name, '-rc')
38+ uses : googleapis/release-please-action@v5
2039 with :
21- release-type : node
40+ token : ${{ secrets.GITHUB_TOKEN }}
41+ config-file : .github/release-config.json
42+ manifest-file : .github/release-manifest.json
43+ target-branch : ${{ github.ref_name }}
2244
23- # releases_created is only true on the run that tagged a release, which is
24- # the run triggered by merging the release PR .
45+ # The prerelease action recognizes merges of both RC and stable Release
46+ # PRs. It creates the corresponding tag and GitHub Release in either case .
2547 - name : trigger npm-publish
26- if : steps.release .outputs.releases_created == 'true'
48+ if : steps.prerelease .outputs.releases_created == 'true'
2749 env :
2850 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2951 GH_REPO : ${{ github.repository }}
30- TAG : ${{ steps.release .outputs.tag_name }}
52+ TAG : ${{ steps.prerelease .outputs.tag_name }}
3153 run : gh workflow run npm-publish.yml --ref "$GITHUB_REF_NAME" -f tag="$TAG"
0 commit comments