generated from terraform-module/terraform-module-blueprint
-
-
Notifications
You must be signed in to change notification settings - Fork 7
60 lines (54 loc) · 1.52 KB
/
release.draft.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
50
51
52
53
54
55
56
57
58
59
60
---
name: release.draft
on:
push:
branches:
- master
workflow_dispatch:
inputs:
prerelease:
description: Is this a pre-release
required: true
default: true
type: boolean
publish:
description: Publish release
required: false
default: false
type: boolean
bump:
description: 'Bumping (#major, #minor or #patch)'
required: false
default: patch
type: choice
options:
- 'patch'
- 'minor'
- 'major'
jobs:
draft-a-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: check next version
uses: anothrNick/github-tag-action@1.67.0
id: tag
env:
DRY_RUN: true
WITH_V: true
DEFAULT_BUMP: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.bump || 'patch' }}
- name: release-draft
uses: release-drafter/release-drafter@v5.25.0
if: "!contains(github.event.head_commit.message, 'skip')"
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
publish: ${{ github.event.inputs.publish }}
prerelease: ${{ github.event.inputs.prerelease }}
tag: ${{ steps.tag.outputs.new_tag }}
- name: check-version
run: |
echo "release it: ${{ github.event.inputs.prerelease }}"
echo "out: ${{ steps.release.name }}"
echo "tag: ${{ steps.release.outputs.tag_name }}"