-
Notifications
You must be signed in to change notification settings - Fork 30
53 lines (49 loc) · 1.89 KB
/
Copy pathrelease-please.yml
File metadata and controls
53 lines (49 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
on:
push:
branches:
- master
name: release-please
permissions:
contents: write
issues: write
pull-requests: write
# Releases created with GITHUB_TOKEN cannot trigger other workflows, so
# npm-publish is dispatched explicitly below. workflow_dispatch is one of the
# few events that always creates a run, even from GITHUB_TOKEN.
actions: write
concurrency:
group: release-please
cancel-in-progress: false
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v5
id: prerelease
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: .github/prerelease-config.json
manifest-file: .github/prerelease-manifest.json
target-branch: ${{ github.ref_name }}
# Once an RC PR is merged and tagged, replace it with the stable Release
# PR. The stable config also synchronizes the prerelease manifest when
# that stable PR is eventually merged.
- name: create stable Release PR
if: >-
steps.prerelease.outputs.releases_created == 'true' &&
contains(steps.prerelease.outputs.tag_name, '-rc')
uses: googleapis/release-please-action@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: .github/release-config.json
manifest-file: .github/release-manifest.json
target-branch: ${{ github.ref_name }}
# The prerelease action recognizes merges of both RC and stable Release
# PRs. It creates the corresponding tag and GitHub Release in either case.
- name: trigger npm-publish
if: steps.prerelease.outputs.releases_created == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
TAG: ${{ steps.prerelease.outputs.tag_name }}
run: gh workflow run npm-publish.yml --ref "$GITHUB_REF_NAME" -f tag="$TAG"