-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (40 loc) · 1.33 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
name: Github Release
on:
pull_request:
branches:
- main
types:
- closed
workflow_dispatch:
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: Clone Repository
uses: actions/checkout@v4
- name: Changelog Reader
id: read-changelog
uses: mindsers/[email protected]
- name: Create tag
uses: actions4git/[email protected]
- run: git tag -a ${{ steps.read-changelog.outputs.version }} -m "Version Release ${{ steps.read-changelog.outputs.version }} on ${{ steps.read-changelog.outputs.date }}"
- run: git push --follow-tags
create-github-release:
runs-on: ubuntu-latest
needs: create-tag
steps:
- name: Clone Repository
uses: actions/checkout@v4
with:
ref: refs/tags/${{ needs.create-tag.outputs.tag_name }}
- name: Create GitHub Releases based on changelog
uses: taiki-e/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: refs/tags/${{ needs.create-tag.outputs.tag_name }}
changelog: ./CHANGELOG.md