-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
59 lines (53 loc) · 1.58 KB
/
action.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
name: 'Simple Autorelease'
description: 'Simple autorelease GitHub action'
branding:
icon: star
color: purple
inputs:
github_token:
description: GitHub token
required: false
default: ${{ github.token }}
release_branch:
description: Release branch
required: false
default: main
default_bump:
description: How to bump version? Major.Minor.Patch
required: false
default: patch
outputs:
not_released:
description: "Returns if new version was released"
value: ${{ steps.changelog.outputs.isEmpty }}
new_version:
description: "New version tag"
value: ${{ steps.tag.outputs.new_tag }}
runs:
using: 'composite'
steps:
- name: Create changelog
id: changelog
uses: dragonraid/changelog-emitter@v0.3.1
with:
github_token: ${{ inputs.github_token }}
- name: Bump tag
if: steps.changelog.outputs.isEmpty == 'false'
id: tag
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ inputs.github_token }}
release_branches: ${{ inputs.release_branch }}
default_bump: ${{ inputs.default_bump }}
- name: Creating release...
uses: actions/create-release@v1
if: steps.changelog.outputs.isEmpty == 'false'
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
with:
tag_name: ${{ steps.tag.outputs.new_tag }}
release_name: ${{ steps.tag.outputs.new_tag }}
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
commitish: ${{ steps.last_git_commit_data.outputs.hash }}