@@ -14,13 +14,38 @@ jobs:
14
14
outputs :
15
15
releases_created : ${{ steps.release.outputs.releases_created }}
16
16
tag_name : ${{ steps.release.outputs.tag_name }}
17
+ pr : ${{ steps.release.outputs.pr }}
17
18
steps :
18
19
- id : release
19
20
name : Run release-please
20
21
uses : googleapis/release-please-action@v4
21
22
with :
22
23
config-file : " .github/prerelease-config.json"
23
24
manifest-file : " .github/prerelease-manifest.json"
25
+ fork : false
26
+ token : ${{ secrets.GITHUB_TOKEN }}
27
+
28
+ - name : Checkout PR branch
29
+ if : ${{ steps.release.outputs.pr }}
30
+ uses : actions/checkout@v4
31
+ with :
32
+ ref : release-please--branches--main
33
+ token : ${{ secrets.GITHUB_TOKEN }}
34
+
35
+ - name : Update prerelease manifest
36
+ if : ${{ steps.release.outputs.pr }}
37
+ env :
38
+ MANIFEST_PATH : .github/prerelease-manifest.json
39
+ RELEASE_TAG : ${{ steps.release.outputs.tag_name }}
40
+ run : |
41
+ jq --arg tag "${RELEASE_TAG//v/}" '.["."] = $tag' $MANIFEST_PATH > temp.json \
42
+ && mv temp.json $MANIFEST_PATH
43
+
44
+ git config user.name "github-actions[bot]"
45
+ git config user.email "github-actions[bot]@users.noreply.github.com"
46
+ git add $MANIFEST_PATH
47
+ git commit -m "chore: sync release manifests"
48
+ git push
24
49
25
50
deploy-test :
26
51
name : Deploy to Test
73
98
- name : Deploy
74
99
run : echo "Deploying to production!"
75
100
76
- - name : Checkout
77
- uses : actions/checkout@v4
78
-
79
- - name : Sync prerelease manifest
80
- env :
81
- MANIFEST_PATH : .github/prerelease-manifest.json
82
- RELEASE_TAG : ${{ needs.release-please.outputs.tag_name }}
83
- run : |
84
- jq --arg tag "${RELEASE_TAG//v/}" '.["."] = $tag' $MANIFEST_PATH > temp.json \
85
- && mv temp.json $MANIFEST_PATH
86
-
87
- - name : Commit change
88
- run : |
89
- git config user.name "github-actions[bot]"
90
- git config user.email "github-actions[bot]@users.noreply.github.com"
91
- git add . $MANIFEST_PATH
92
- git commit -m "chore: sync release manifests"
93
- git push
94
-
95
101
publish :
96
102
name : Publish images
97
103
runs-on : ubuntu-latest
@@ -110,4 +116,4 @@ jobs:
110
116
run : echo "Building for '${{ matrix.arch }}' ..."
111
117
112
118
- name : Publish
113
- run : echo "Publishing for '${{ matrix.arch }}' ..."
119
+ run : echo "Publishing for '${{ matrix.arch }}' ..."
0 commit comments