Generate Release #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
schedule: | |
- cron: '05 11 * * *' # 11:05am UTC everyday | |
workflow_call: | |
inputs: | |
stream_name: | |
description: "Release Tag (e.g. stream10, latest)" | |
type: string | |
default: "latest" | |
required: false | |
workflow_dispatch: | |
inputs: | |
handwritten: | |
description: "Small Changelog about changes in this build" | |
stream_name: | |
description: "Release Tag (e.g. gts, stable)" | |
required: false | |
default: '["latest"]' | |
type: choice | |
options: | |
- '["stream10"]' | |
- '["latest"]' | |
- '["stream10","latest"]' | |
permissions: | |
contents: write | |
name: Generate Release | |
jobs: | |
generate-release: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
version: ${{ fromJson( inputs.stream_name ) }} | |
steps: | |
- name: Checkout last 500 commits (for <commits> to work) | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 500 | |
- name: Generate Release Text | |
id: generate-release-text | |
shell: bash | |
run: | | |
python3 .github/changelogs.py --workdir . "${{ matrix.version }}" ./output.env ./changelog.md --handwritten "${{ inputs.handwritten }}" | |
source ./output.env | |
echo "title=${TITLE}" >> $GITHUB_OUTPUT | |
echo "tag=${TAG}" >> $GITHUB_OUTPUT | |
- name: Create Release | |
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v2 | |
if: (github.event.schedule == '50 5 * * 0' || contains(fromJson('["workflow_dispatch", "workflow_call"]'), github.event_name)) | |
with: | |
name: ${{ steps.generate-release-text.outputs.title }} | |
tag_name: ${{ steps.generate-release-text.outputs.tag }} | |
body_path: ./changelog.md | |
make_latest: true | |