-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 1.63 KB
/
release.yml
File metadata and controls
61 lines (53 loc) · 1.63 KB
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
name: Release
on:
push:
tags:
- 'v*'
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository (attempt 1)
id: checkout_attempt_1
continue-on-error: true
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout repository (attempt 2)
id: checkout_attempt_2
if: ${{ steps.checkout_attempt_1.outcome == 'failure' }}
continue-on-error: true
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout repository (attempt 3)
if: ${{ steps.checkout_attempt_1.outcome == 'failure' && steps.checkout_attempt_2.outcome == 'failure' }}
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Generate release changelog
run: |
python3 scripts/generate_release_changelog.py \
--target-ref "${GITHUB_REF_NAME}" \
--tag-name "${GITHUB_REF_NAME}" \
--output "release-changelog.md"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
target_commitish: ${{ github.sha }}
draft: false
prerelease: ${{ contains(github.ref_name, '-') }}
generate_release_notes: false
body_path: release-changelog.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}