-
-
Notifications
You must be signed in to change notification settings - Fork 13
61 lines (57 loc) · 1.71 KB
/
release-please.yml
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
name: release-please
on:
push:
branches:
- main
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
release_pr: ${{ steps.release-please.outputs.pr }}
release_ref: ${{ steps.release-please.outputs.sha }}
permissions:
contents: write
pull-requests: write
steps:
- uses: googleapis/release-please-action@v3
id: release-please
with:
release-type: node
package-name: contrib.rocks
create-preview-comment:
needs:
- release-please
if: ${{ needs.release-please.outputs.release_pr }}
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Find Comment
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ fromJSON(needs.release-please.outputs.release_pr).number }}
comment-author: 'github-actions[bot]'
body-includes: 'Preview:'
- name: Create preview comment
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ fromJSON(needs.release-please.outputs.release_pr).number }}
body: |
Preview: ![](https://stg.contrib.rocks/image?repo=angular/angular-ja)
edit-mode: replace
run-deploy:
needs:
- release-please
if: ${{ needs.release-please.outputs.release_created }}
permissions:
contents: 'read'
id-token: 'write'
uses: ./.github/workflows/deploy-production.yml
with:
ref: ${{ needs.release-please.outputs.release_ref }}
secrets: inherit