subsurface/.github/workflows/post-releasenotes.yml
Dirk Hohndel c0c447a5b6 build-system: don't discard the get-or-create-build-nr script output
That was the whole point of the previous change.
Also, run the build number creation on a pull request as well (at least for a
while) so we don't need to create new releases in order to test that part of
the process).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2024-01-10 13:44:06 -08:00

37 lines
1.1 KiB
YAML

name: Post Release
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
postRelease:
runs-on: ubuntu-latest
steps:
- name: checkout sources
uses: actions/checkout@v4
# since we are running this step on a pull request, we will skip build numbers in releases
- name: atomically create or retrieve the build number and assemble release notes
id: version_number
run: |
bash -x ./scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release"
bash scripts/create-releasenotes.sh ${{ github.event.head_commit.id }}
# ironically, we have to upload a file, otherwise this won't create a release with just the release notes
- name: publish release
if: github.event_name == 'push'
uses: softprops/action-gh-release@v1
with:
tag_name: v$(<release-version)
repository: subsurface/nightly-builds
token: ${{ secrets.NIGHTLY_BUILDS }}
prerelease: false
files: gh_release_notes
body_path: gh_release_notes