Skip to content

Commit 4329253

Browse files
GHA driven website updates (#283)
1 parent 1ba6111 commit 4329253

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ on:
99
type: string
1010

1111
permissions:
12-
pull-requests: write
12+
pull-requests: write
13+
contents: write
14+
actions: write
1315

1416
jobs:
1517
release:
@@ -26,9 +28,19 @@ jobs:
2628

2729
- name: Git Commit
2830
run: |
29-
git checkout -b release-"${{ github.event.inputs.version }}"
31+
git checkout -B release-"${{ github.event.inputs.version }}"
3032
git add --all
31-
git commit -m "Release ${{ github.event.inputs.version }}"
33+
git -c user.name='github-actions[bot]' -c user.email='github-actions[bot]@users.noreply.github.com' commit -m "Release ${{ github.event.inputs.version }}"
3234
35+
- name: git push
36+
env:
37+
GH_TOKEN: ${{ github.token }}
38+
run: git push --set-upstream origin release-"${{ github.event.inputs.version }}" --force
39+
40+
# This is a gnarly command for updating an existing, or making a new PR
41+
# https://github.com/cli/cli/discussions/5792
3342
- name: Generate PR
34-
run: gh pr create --base source --fill
43+
run: gh pr edit 'release-${{ github.event.inputs.version }}' -b '${{ env.PR_BODY }}' -t '${{ env.PR_TITLE }}' && gh pr reopen '${{ env.BRANCH_NAME }}' || gh pr create --base source --fill --head 'release-${{ github.event.inputs.version }}'
44+
env:
45+
GH_TOKEN: ${{ github.token }}
46+

0 commit comments

Comments
 (0)