-
-
Notifications
You must be signed in to change notification settings - Fork 175
76 lines (69 loc) · 2.08 KB
/
generate_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
on:
workflow_call:
fedora_version:
description: "Release Tag (e.g. stable or 41)"
type: string
required: true
workflow_dispatch:
inputs:
handwritten:
description: "Small Changelog about changes in this build"
make_latest:
description: "Make latest for Release"
type: choice
default: "false"
options:
- "false"
- "true"
fedora_version:
description: "Release Tag (e.g. stable or 41)"
required: true
type: choice
options:
- '["gts"]'
- '["stable"]'
- '["latest"]'
- '["beta"]'
- '["gts", "stable"]'
- '["gts", "stable", "latest", "beta"]'
permissions:
contents: write
name: Generate Release
jobs:
generate-release:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: ${{ fromJson( inputs.fedora_version ) }}
steps:
- name: Checkout lass 500 commits (fot <commits> to work)
uses: actions/checkout@v4
with:
fetch-depth: 500
- name: Generate Release Text
id: generate-release-text
shell: bash
run: |
if [[ "${{ matrix.version }}" == "stable" ]]; then
version=stable-daily
else
version=${{ matrix.version }}
fi
python3 ./.github/changelog.py \
"${version}" \
./output.env \
./changelog.md \
--workdir . \
--handwritten "${{ github.event.inputs.handwritten }}"
source ./output.env
echo "title=${TITLE}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-relases@v@
with:
name: ${{ steps.generate-release-text.outputs.title }}
tag_name: ${{ steps.generate-release-text.outputs.tag }}
body_path: ./changelog.md
make_latest: ${{ inputs.make_latest == 'true' && matrix.version == 'stable' || false }}
prerelease: ${{ inputs.make_latest != 'false' }}