subsurface/.github/workflows/post-releasenotes.yml
Dirk Hohndel c33e05c1d4 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>
2024-01-10 09:17:49 -08:00

31 lines
898 B
YAML

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