-
Notifications
You must be signed in to change notification settings - Fork 9
47 lines (46 loc) · 1.77 KB
/
release-notes.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
name: Changelog
on:
issues:
types: [closed,reopened]
push:
branches:
- '[1-9]+.[0-9]+.x'
- master
workflow_dispatch:
jobs:
release_notes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check if it has release drafter config file
id: check_release_drafter
run: |
has_release_drafter=$([ -f .github/release-drafter.yml ] && echo "true" || echo "false")
echo ::set-output name=has_release_drafter::${has_release_drafter}
# If it has release drafter:
- uses: release-drafter/[email protected]
if: steps.check_release_drafter.outputs.has_release_drafter == 'true'
# env:
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
prerelease: false
commitish: master
# Otherwise:
- name: Export Gradle Properties
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
uses: micronaut-projects/github-actions/export-gradle-properties@master
- uses: micronaut-projects/github-actions/release-notes@master
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
id: release_notes
# with:
# token: ${{ secrets.GH_TOKEN }}
- uses: ncipollo/release-action@v1
if: steps.check_release_drafter.outputs.has_release_drafter == 'false' && steps.release_notes.outputs.generated_changelog == 'true'
with:
allowUpdates: true
commit: ${{ steps.release_notes.outputs.current_branch }}
draft: true
name: ${{ env.title }} ${{ steps.release_notes.outputs.next_version }}
tag: v${{ steps.release_notes.outputs.next_version }}
bodyFile: CHANGELOG.md
# token: ${{ secrets.GH_TOKEN }}