mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:53:23 +00:00
build-system: create release notes only once
Some experimentation showed what should have been obvious. The release information is additive. So it's enough if ONE of the actions creates release notes, all the others can simply add additional release artifacts. To make this more obvious, this commit creates a new action that does nothing but create the release notes and publish the release. Since it really doesn't do anything else, it's likely to be the quickest to complete, but that doesn't matter - the last action that has a body or body_path in the gh-release action determines the release notes. And we now have exactly one action that does so. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
14e715be6e
commit
c33e05c1d4
5 changed files with 31 additions and 18 deletions
3
.github/workflows/android.yml
vendored
3
.github/workflows/android.yml
vendored
|
@ -10,7 +10,6 @@ on:
|
||||||
env:
|
env:
|
||||||
BUILD_ROOT: ${{ github.workspace }}/..
|
BUILD_ROOT: ${{ github.workspace }}/..
|
||||||
KEYSTORE_FILE: ${{ github.workspace }}/../subsurface.keystore
|
KEYSTORE_FILE: ${{ github.workspace }}/../subsurface.keystore
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildAndroid:
|
buildAndroid:
|
||||||
|
@ -28,7 +27,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
version="$(bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")"
|
version="$(bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")"
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
echo "version=$version" >> $GITHUB_OUTPUT
|
||||||
bash scripts/create-releasenotes.sh ${{ github.event.head_commit.id }}
|
|
||||||
|
|
||||||
- name: store dummy version and build number for non-push build runs
|
- name: store dummy version and build number for non-push build runs
|
||||||
if: github.event_name != 'push'
|
if: github.event_name != 'push'
|
||||||
|
@ -79,7 +77,6 @@ jobs:
|
||||||
fail_on_unmatched_files: true
|
fail_on_unmatched_files: true
|
||||||
files: |
|
files: |
|
||||||
Subsurface-mobile*.apk
|
Subsurface-mobile*.apk
|
||||||
body_path: gh_release_notes
|
|
||||||
|
|
||||||
- name: delete the keystore
|
- name: delete the keystore
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
|
|
5
.github/workflows/linux-trusty-5.12.yml
vendored
5
.github/workflows/linux-trusty-5.12.yml
vendored
|
@ -7,9 +7,6 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildAppImage:
|
buildAppImage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -26,7 +23,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
version=$(bash ./scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")
|
version=$(bash ./scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
echo "version=$version" >> $GITHUB_OUTPUT
|
||||||
bash scripts/create-releasenotes.sh ${{ github.event.head_commit.id }}
|
|
||||||
|
|
||||||
- name: store dummy version and build number for pull request
|
- name: store dummy version and build number for pull request
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
|
@ -74,4 +70,3 @@ jobs:
|
||||||
fail_on_unmatched_files: true
|
fail_on_unmatched_files: true
|
||||||
files: |
|
files: |
|
||||||
./Subsurface*.AppImage
|
./Subsurface*.AppImage
|
||||||
body_path: gh_release_notes
|
|
5
.github/workflows/mac.yml
vendored
5
.github/workflows/mac.yml
vendored
|
@ -7,9 +7,6 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildMac:
|
buildMac:
|
||||||
runs-on: macOS-11
|
runs-on: macOS-11
|
||||||
|
@ -23,7 +20,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
version=$(bash ./scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")
|
version=$(bash ./scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
echo "version=$version" >> $GITHUB_OUTPUT
|
||||||
bash scripts/create-releasenotes.sh ${{ github.event.head_commit.id }}
|
|
||||||
|
|
||||||
- name: store dummy version and build number for pull request
|
- name: store dummy version and build number for pull request
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
|
@ -69,4 +65,3 @@ jobs:
|
||||||
prerelease: false
|
prerelease: false
|
||||||
fail_on_unmatched_files: true
|
fail_on_unmatched_files: true
|
||||||
files: ${{ steps.build.outputs.dmg }}
|
files: ${{ steps.build.outputs.dmg }}
|
||||||
body_path: gh_release_notes
|
|
||||||
|
|
31
.github/workflows/post-releasenotes.yml
vendored
Normal file
31
.github/workflows/post-releasenotes.yml
vendored
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
name: Post Release
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
postRelease:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout sources
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: atomically create or retrieve the build number and assemble release notes
|
||||||
|
id: version_number
|
||||||
|
run: |
|
||||||
|
version=$(bash ./scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")
|
||||||
|
echo "version=$version" >> $GITHUB_OUTPUT
|
||||||
|
bash scripts/create-releasenotes.sh ${{ github.event.head_commit.id }}
|
||||||
|
|
||||||
|
- name: publish release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
tag_name: v${{ steps.version_number.outputs.version }}
|
||||||
|
repository: subsurface/nightly-builds
|
||||||
|
token: ${{ secrets.NIGHTLY_BUILDS }}
|
||||||
|
prerelease: false
|
||||||
|
body_path: gh_release_notes
|
5
.github/workflows/windows.yml
vendored
5
.github/workflows/windows.yml
vendored
|
@ -7,9 +7,6 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildWindows:
|
buildWindows:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -26,7 +23,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
version=$(bash ./scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")
|
version=$(bash ./scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
echo "version=$version" >> $GITHUB_OUTPUT
|
||||||
bash scripts/create-releasenotes.sh ${{ github.event.head_commit.id }}
|
|
||||||
|
|
||||||
- name: store dummy version and build number for pull request
|
- name: store dummy version and build number for pull request
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
|
@ -64,4 +60,3 @@ jobs:
|
||||||
files: |
|
files: |
|
||||||
./subsurface*.exe*
|
./subsurface*.exe*
|
||||||
./smtk2ssrf*.exe
|
./smtk2ssrf*.exe
|
||||||
body_path: gh_release_notes
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue