-
Notifications
You must be signed in to change notification settings - Fork 51
53 lines (50 loc) · 2.02 KB
/
Copy pathrelease-notes.yml
File metadata and controls
53 lines (50 loc) · 2.02 KB
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
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@v5.0.0
- name: Fetch all tags and branches
run: git fetch --prune --unshallow
- name: Cache Tools
uses: actions/cache@v4.3.0
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake', 'Source/Cake.Recipe/Content/addins.cake', 'Source/Cake.Recipe/Content/tools.cake', 'Source/Cake.Recipe/Content/modules.cake') }}
- name: Set up git version
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
uses: gittools/actions/gitversion/setup@v4.1.0
with:
versionSpec: "5.x"
- name: Run git version
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
id: gitversion
uses: gittools/actions/gitversion/execute@v4.1.0
- 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/github-push-action@v1.0.0
with:
branch: "release/${{ steps.gitversion.outputs.majorMinorPatch }}"
github_token: ${{ secrets.GH_TOKEN }}
- name: Creating includes.cake file
run: |
Get-ChildItem "./Source/Cake.Recipe/Content/*.cake" -Exclude "version.cake" | % {
"#load `"local:?path=$($_.FullName -replace '\\','/')`""
} | Out-File "./includes.cake"
shell: pwsh
- name: Drafting Release Notes
uses: cake-build/cake-action@v3.0.1
with:
script-path: recipe.cake
target: releasenotes
verbosity: Diagnostic
cake-version: 1.1.0
cake-bootstrap: true