mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
CICD: Add a File Containing the Release Title to CICD Releases.
Add a file containing the release title (derived from the pull request title / commit message) to CICD releases - this is so that it will be able to pick this up by the process updating the release pages on our webserver, and show a list of the last few changes for each release. Signed-off-by: Michael Keller <mikeller@042.ch>
This commit is contained in:
parent
94a7ba9097
commit
9cdb9f7989
3 changed files with 20 additions and 15 deletions
4
.github/workflows/post-releasenotes.yml
vendored
4
.github/workflows/post-releasenotes.yml
vendored
|
|
@ -25,7 +25,7 @@ jobs:
|
||||||
version=$(cat release-version)
|
version=$(cat release-version)
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
echo "version=$version" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# ironically, we have to upload a file, otherwise this won't create a release with just the release notes
|
# add a file containing the release title so it can be picked up and listed on the release page on our web server
|
||||||
- name: publish release
|
- name: publish release
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
|
@ -34,5 +34,5 @@ jobs:
|
||||||
repository: ${{ github.repository_owner }}/nightly-builds
|
repository: ${{ github.repository_owner }}/nightly-builds
|
||||||
token: ${{ secrets.NIGHTLY_BUILDS }}
|
token: ${{ secrets.NIGHTLY_BUILDS }}
|
||||||
prerelease: false
|
prerelease: false
|
||||||
files: gh_release_notes.md
|
files: release_content_title.txt
|
||||||
body_path: gh_release_notes.md
|
body_path: gh_release_notes.md
|
||||||
|
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -48,3 +48,4 @@ packaging/ios/asset_catalog_compiler.Info.plist
|
||||||
appdata/subsurface.appdata.xml
|
appdata/subsurface.appdata.xml
|
||||||
android-mobile/Roboto-Regular.ttf
|
android-mobile/Roboto-Regular.ttf
|
||||||
gh_release_notes.md
|
gh_release_notes.md
|
||||||
|
release_content_title.txt
|
||||||
|
|
|
||||||
|
|
@ -8,19 +8,23 @@ json=$(gh pr list -s merged -S "$1" --json title,number,url)
|
||||||
|
|
||||||
cp gh_release_notes_top.md gh_release_notes.md
|
cp gh_release_notes_top.md gh_release_notes.md
|
||||||
if [[ $json != "[]" ]]; then
|
if [[ $json != "[]" ]]; then
|
||||||
(
|
echo -n $json | jq -j '.[0]|{title}|join(" ")' > release_content_title.txt
|
||||||
echo -n 'This build was created by [merging pull request '
|
|
||||||
echo -n $json | jq -j '.[0]|{number}|join(" ")'
|
(
|
||||||
echo -n ' ('
|
echo -n 'This build was created by [merging pull request '
|
||||||
echo -n $json | jq -j '.[0]|{title}|join(" ")'
|
echo -n $json | jq -j '.[0]|{number}|join(" ")'
|
||||||
echo -n ')]('
|
echo -n ' ('
|
||||||
echo -n $json | jq -j '.[0]|{url}|join(" ")'
|
cat release_content_title.txt
|
||||||
echo ' )'
|
echo -n ')]('
|
||||||
) >> gh_release_notes.md
|
echo -n $json | jq -j '.[0]|{url}|join(" ")'
|
||||||
|
echo ' )'
|
||||||
|
) >> gh_release_notes.md
|
||||||
else
|
else
|
||||||
(
|
git log --pretty=format:"%an: '%s'" -n1 > release_content_title.txt
|
||||||
echo "This build was created by directly pushing to the Subsurface repo."
|
|
||||||
echo "The latest commit was [$(git log --pretty=format:"%an: '%s'" -n1)](https://github.com/subsurface/subsurface/commit/$1 )"
|
(
|
||||||
) >> gh_release_notes.md
|
echo "This build was created by directly pushing to the Subsurface repo."
|
||||||
|
echo "The latest commit was [$(cat release_content_title.txt)](https://github.com/subsurface/subsurface/commit/$1 )"
|
||||||
|
) >> gh_release_notes.md
|
||||||
fi
|
fi
|
||||||
cat gh_release_notes_bottom.md >> gh_release_notes.md
|
cat gh_release_notes_bottom.md >> gh_release_notes.md
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue