-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (58 loc) · 1.93 KB
/
release.yml
File metadata and controls
64 lines (58 loc) · 1.93 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
54
55
56
57
58
59
60
61
62
63
64
name: 06-release
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: read
jobs:
process:
name: 01-release-please
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
releases_created: ${{ steps.release-please.outputs.releases_created }}
prs_created: ${{ steps.release-please.outputs.prs_created }}
steps:
- name: 01-release-please
uses: googleapis/release-please-action@v4
id: release-please
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN || github.token }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
skip-github-pull-request: false
dispatch-publish:
name: 02-dispatch-publish
needs: process
runs-on: ubuntu-latest
permissions:
contents: write
if: needs.process.outputs.releases_created == 'true' || needs.process.outputs.prs_created == 'true'
steps:
- name: 01-dispatch-latest-publish
if: needs.process.outputs.releases_created == 'true'
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
await github.rest.repos.createDispatchEvent({
owner: context.repo.owner,
repo: context.repo.repo,
event_type: 'publish-package',
client_payload: { tag: 'latest' },
});
- name: 02-dispatch-next-publish
if: needs.process.outputs.prs_created == 'true'
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
await github.rest.repos.createDispatchEvent({
owner: context.repo.owner,
repo: context.repo.repo,
event_type: 'publish-package',
client_payload: { tag: 'next' },
});