-
-
Notifications
You must be signed in to change notification settings - Fork 62
40 lines (36 loc) · 1.14 KB
/
ci-release-drafter.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
name: Release Drafter
on:
pull_request:
types: [closed]
workflow_dispatch:
permissions:
# write permission is required to create a github release
contents: write
pull-requests: write
jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Required due to the weg Git works, without it this action won't be able to find any or the correct tags
ref: main
- name: version
id: version
run: |
tag=${GITHUB_REF/refs\/tags\//}
version=${tag#v}
major=${version%%.*}
echo "tag=${tag}" >> $GITHUB_OUTPUT
echo "version=${version}" >> $GITHUB_OUTPUT
echo "major=${major}" >> $GITHUB_OUTPUT
- name: Automatic release
uses: release-drafter/release-drafter@09c613e259eb8d4e7c81c2cb00618eb5fc4575a7 # v5.25.0
with:
version: ${{ steps.version.outputs.version }}
# tag-template: 'v$RESOLVED_VERSION'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}