-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.22 KB
/
release.yaml
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
name: Release
on:
pull_request:
types:
- closed
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tag-release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'
- name: Bump version and push tag
id: tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
- name: Generate release changelog
uses: heinrichreimer/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
onlyLastTag: true
- name: Create github release
if: ${{ success() }}
run: |
gh release create \
${{ steps.tag.outputs.new_tag }} \
--title ${{ steps.tag.outputs.new_tag }} \
--notes-file CHANGELOG.md \
--target main
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Skip github release
if: ${{ failure() }}
run: echo "Skipping github release"