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