-
Notifications
You must be signed in to change notification settings - Fork 7
46 lines (43 loc) · 1.85 KB
/
release-notes.yml
File metadata and controls
46 lines (43 loc) · 1.85 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
name: Draft Release Notes
on:
workflow_dispatch:
jobs:
draft-stable:
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
runs-on: ubuntu-latest
steps:
- name: Checkout the requested branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Fetch all tags and branches
run: git fetch --prune --unshallow
- name: Cache Tools
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5
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/setup@d0139503a9321f76b4a417dfdc8aebcec24decdd # v4.2.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@d0139503a9321f76b4a417dfdc8aebcec24decdd # v4.2.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@77c5b412c50b723d2a4fbc6d71fb5723bcd439aa # v1.0.0
with:
branch: "release/${{ steps.gitversion.outputs.majorMinorPatch }}"
github_token: ${{ secrets.GH_TOKEN }}
- name: Drafting Release Notes
uses: cake-build/cake-action@d218f1133bb74a1df0b08c89cfd8fc100c09e1a0 # v3
with:
script-path: recipe.cake
target: releasenotes
verbosity: Diagnostic
cake-version: tool-manifest