-
-
Notifications
You must be signed in to change notification settings - Fork 5
49 lines (44 loc) · 1.14 KB
/
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: Create Release
on:
push:
branches:
- 'main'
workflow_dispatch:
inputs:
mode:
description: 'Release Mode'
required: true
default: 'draft'
type: choice
options:
- draft
- publish
jobs:
create_release:
name: Create new release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Calculate release version
id: version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: release-drafter/release-drafter@v5
with:
commitish: ${{ github.ref }}
disable-autolabeler: true
- name: Print calculated version
env:
VERSION_OUTPUTS: ${{ toJSON(steps.version.outputs) }}
run: |
echo "$VERSION_OUTPUTS"
- name: Create release
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: release-drafter/release-drafter@v5
with:
publish: ${{ github.event.inputs.mode == 'publish' }}
commitish: ${{ github.ref }}
disable-autolabeler: true