aurora/.github/workflows/generate-release.yml
ubot-7274[bot] dbc58acc74
chore(deps): update oras-project/setup-oras action to v2.0.2 (#2957)
Co-authored-by: ubot-7274[bot] <217212047+ubot-7274[bot]@users.noreply.github.com>
2026-09-29 19:31:25 +00:00

77 lines
2.3 KiB
YAML

on:
workflow_call:
inputs:
stream_name:
description: "Release Tag (e.g. stable, latest)"
type: string
required: true
workflow_dispatch:
inputs:
handwritten:
description: "Small Changelog about changes in this build"
stream_name:
description: "Release Tag (e.g. stable, latest)"
required: true
type: choice
options:
- '["stable"]'
permissions: {}
name: Generate Release
jobs:
generate-release:
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
fail-fast: false
matrix:
version: ${{ fromJson( inputs.stream_name ) }}
steps:
- name: Checkout last 500 commits (for <commits> to work)
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 500
ref: ${{ vars.STABLE_BRANCH }}
- name: Install Just
run: |
/home/linuxbrew/.linuxbrew/bin/brew install just
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
- name: Check Just Syntax
shell: bash
run: |
just check
- name: Install ORAS
uses: oras-project/setup-oras@005458ad77f1c8facd38a094e4af2e69e5607ff4 # v2.0.2
- name: Generate Release Text
id: generate-release-text
env:
MATRIX_VERSION: "${{ matrix.version }}"
HANDWRITTEN: "${{ inputs.handwritten }}"
shell: bash
run: |
just changelogs "${MATRIX_VERSION}" "${HANDWRITTEN}"
source ./output.env
echo "title=${TITLE}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- name: Create Release
if: contains(fromJson('["stable"]'), matrix.version) && (github.event.schedule == '0 1 * * TUE' || contains(fromJson('["workflow_dispatch", "workflow_call"]'), github.event_name))
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TITLE: ${{ steps.generate-release-text.outputs.title }}
TAG: ${{ steps.generate-release-text.outputs.tag }}
BODY_PATH: ./changelog.md
run: |
gh release create \
"${TAG}" \
--title "${TITLE}" \
-F "${BODY_PATH}" \
--latest