-
Notifications
You must be signed in to change notification settings - Fork 20
46 lines (43 loc) · 1.6 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
name: Draft Release Notes
on:
workflow_dispatch:
jobs:
draft-stable:
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
runs-on: ubuntu-20.04
steps:
- name: Checkout the requested branch
uses: actions/checkout@v3
- name: Fetch all tags and branches
run: git fetch --prune --unshallow
- name: Cache Tools
uses: actions/cache@v3
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
- name: Set up git version
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "5.x"
- name: Run git version
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
id: gitversion
uses: gittools/actions/gitversion/[email protected]
- name: Create release branch ${{ github.event.inputs.version }}
if: ${{ steps.gitversion.outputs.majorMinorPatch }}
run: git switch -c release/${{ steps.gitversion.outputs.majorMinorPatch }}
- name: Push new branch
if: ${{ steps.gitversion.outputs.majorMinorPatch }}
uses: ad-m/[email protected]
with:
branch: "release/${{ steps.gitversion.outputs.majorMinorPatch }}"
github_token: ${{ secrets.GH_TOKEN }}
- name: Drafting Release Notes
uses: cake-build/[email protected]
with:
script-path: recipe.cake
target: releasenotes
verbosity: Diagnostic
cake-version: tool-manifest