Skip to content
This repository was archived by the owner on Mar 1, 2021. It is now read-only.

Commit 3f9af1a

Browse files
authored
(GH-26) Add workflow to generate release notes
1 parent 67f0630 commit 3f9af1a

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Draft Release Notes
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
draft-stable:
8+
env:
9+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout the requested branch
14+
uses: actions/checkout@v2.3.4
15+
- name: Fetch all tags and branches
16+
run: git fetch --prune --unshallow
17+
- name: Cache Tools
18+
uses: actions/cache@v2.1.4
19+
with:
20+
path: tools
21+
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
22+
- name: Set up git version
23+
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
24+
uses: gittools/actions/gitversion/setup@v0.9.9
25+
with:
26+
versionSpec: "5.x"
27+
- name: Run git version
28+
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
29+
id: gitversion
30+
uses: gittools/actions/gitversion/execute@v0.9.9
31+
- name: Create release branch ${{ github.event.inputs.version }}
32+
if: ${{ steps.gitversion.outputs.majorMinorPatch }}
33+
run: git switch -c release/${{ steps.gitversion.outputs.majorMinorPatch }}
34+
- name: Push new branch
35+
if: ${{ steps.gitversion.outputs.majorMinorPatch }}
36+
uses: ad-m/github-push-action@v0.6.0
37+
with:
38+
branch: "release/${{ steps.gitversion.outputs.majorMinorPatch }}"
39+
github_token: ${{ secrets.GH_TOKEN }}
40+
- name: Drafting Release Notes
41+
uses: cake-build/cake-action@v1
42+
with:
43+
script-path: recipe.cake
44+
target: releasenotes
45+
verbosity: Diagnostic
46+
cake-version: 0.38.5
47+
cake-bootstrap: true

0 commit comments

Comments
 (0)