-
Notifications
You must be signed in to change notification settings - Fork 8
49 lines (42 loc) · 1.51 KB
/
github-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
name: Github Release
on:
pull_request:
branches:
- main
types:
- closed
jobs:
create-tag:
runs-on: ubuntu-latest
if: (github.event.pull_request.merged && contains( github.event.pull_request.labels.*.name, 'autorelease'))
permissions:
contents: write
outputs:
tag_name: ${{ steps.read-changelog.outputs.version }}
steps:
- name: Generate Token for sbb-app-bakery GH App
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.APPBAKERYGITHUBAPP_APPID }}
private-key: ${{ secrets.APPBAKERYGITHUBAPP_PRIVATEKEY }}
- name: Clone Repository
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
persist-credentials: false
- name: Changelog Reader
id: read-changelog
uses: mindsers/changelog-reader-action@v2.2.3
- name: Create release tag
uses: rickstaa/action-create-tag@v1.7.2
with:
github_token: ${{ steps.app-token.outputs.token }}
tag: ${{ steps.read-changelog.outputs.version }}
message: "Version Release ${{ steps.read-changelog.outputs.version }} on ${{ steps.read-changelog.outputs.date }}"
- name: Create GitHub Releases based on changelog
uses: taiki-e/create-gh-release-action@v1.8.3
with:
token: ${{ steps.app-token.outputs.token }}
ref: refs/tags/${{ steps.read-changelog.outputs.version }}
changelog: ./CHANGELOG.md