Skip to content

Commit 5fe6808

Browse files
authored
Merge pull request #53 from levigo/fix/JF-1693_readme-release-version-fix
fix(JF-1693): Fixes update for workflow README for release.
2 parents 26741ed + 76cba0a commit 5fe6808

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

.github/workflows/continuous-delivery.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
paths-ignore:
88
# - '.github/**'
99
- '**/README.md'
10+
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
1015
env:
1116
# This will suppress any download for dependencies and plugins or upload messages which would clutter the console log.
1217
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
@@ -97,14 +102,18 @@ jobs:
97102
# extract list of mime-types from magic.xml and append to README.md
98103
grep -Po '(?<=<mime-type>)[^<]+' src/main/resources/magic.xml | sort | uniq | xargs printf "\t%s\n" >> README.md
99104
100-
git add README.md
101-
git commit -m "Edit README.md to contain correct version"
102-
103-
- name: Push changes
104-
uses: ad-m/github-push-action@master
105+
- name: Create PR for README update
106+
uses: peter-evans/create-pull-request@v8
105107
with:
106-
branch: master
107-
github_token: ${{ secrets.GITHUB_TOKEN }}
108+
token: ${{ secrets.GITHUB_TOKEN }}
109+
base: master
110+
branch: ci/readme-update
111+
delete-branch: true
112+
add-paths: |
113+
README.md
114+
commit-message: "Edit README.md to contain correct version"
115+
title: "docs: update README for ${{ steps.semanticversion.outputs.new_version }}"
116+
body: "Automated README update after release."
108117

109118
- name: Create release
110119
uses: softprops/action-gh-release@v2

0 commit comments

Comments
 (0)