-
Notifications
You must be signed in to change notification settings - Fork 5
66 lines (65 loc) · 2.15 KB
/
Release.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Release
on:
workflow_dispatch:
inputs:
ReleaseHeader:
description: The header to be added to the release.
required: false
jobs:
Release:
runs-on: ubuntu-latest
defaults:
run:
shell: pwsh
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/[email protected]
- name: Update README Inputs/Outputs
uses: mdvorak/update-action-readme@v1
- name: Update Changelog
id: changelog
uses: natescherer/changelog-management-action@v1
with:
mode: release
releaseVersion: ${{ steps.gitversion.outputs.SemVer }}
- name: Push SemVer Tag
uses: rickstaa/action-create-tag@v1
with:
tag: v${{ steps.gitversion.outputs.SemVer }}
- name: Push Major Tag
uses: rickstaa/action-create-tag@v1
with:
tag: v${{ steps.gitversion.outputs.Major }}
force_push_tag: true
- name: Push Major.Minor Tag
uses: rickstaa/action-create-tag@v1
with:
tag: v${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}
force_push_tag: true
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
base: main
commit-message: Release v${{ steps.gitversion.outputs.SemVer }}
branch: release/v${{ steps.gitversion.outputs.SemVer }}
delete-branch: true
title: Release v${{ steps.gitversion.outputs.SemVer }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: v${{ steps.gitversion.outputs.SemVer }}
tag_name: v${{ steps.gitversion.outputs.SemVer }}
body: |
# Release v${{ steps.gitversion.outputs.SemVer }}
${{ github.event.inputs.ReleaseHeader}}
## Changes
${{ steps.changelog.outputs.releasenotes }}