forked from AcademySoftwareFoundation/OpenRV
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (53 loc) · 1.89 KB
/
release-pr.yml
File metadata and controls
60 lines (53 loc) · 1.89 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
name: Release PR
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-pr:
runs-on: ubuntu-latest
# Skip if this push is the merge of a release PR
if: github.repository_owner == 'AcademySoftwareFoundation' && !startsWith(github.event.head_commit.message, 'chore(release):')
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Generate full changelog
id: changelog
uses: orhun/git-cliff-action@e16f179f0be49ecdfe63753837f20b9531642772 # v4.7.0
with:
config: cliff.toml
args: --bump
env:
OUTPUT: CHANGELOG.md
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get bumped version
id: version
uses: orhun/git-cliff-action@e16f179f0be49ecdfe63753837f20b9531642772 # v4.7.0
with:
config: cliff.toml
args: --bumped-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate release notes for PR body
id: release-notes
uses: orhun/git-cliff-action@e16f179f0be49ecdfe63753837f20b9531642772 # v4.7.0
with:
config: cliff.toml
args: --unreleased --strip header
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create or update release PR
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore(release): update CHANGELOG for ${{ steps.version.outputs.content }}"
branch: release/next
delete-branch: true
title: "chore(release): release ${{ steps.version.outputs.content }}"
body: ${{ steps.release-notes.outputs.content }}
labels: autorelease