-
-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (59 loc) · 2.11 KB
/
release.yaml
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
67
68
69
---
name: Release
on:
push:
branches:
- release/*
jobs:
release:
name: Release
if: startsWith(github.ref, 'refs/heads/release')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- name: Zip Release
run: zip -x '*.git*' -r release.zip .
- name: Extract owner and repo
uses: jungwinter/split@v2
id: repo
with:
separator: '/'
msg: ${{ github.repository }}
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- name: Use GitVersion
uses: gittools/actions/gitversion/[email protected]
id: gitversion
- name: Install GitReleaseManager
uses: gittools/actions/gitreleasemanager/[email protected]
with:
versionSpec: '0.14.x'
- name: Create release with GitReleaseManager
uses: gittools/actions/gitreleasemanager/[email protected]
with:
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
owner: ${{ steps.repo.outputs._0 }}
repository: ${{ steps.repo.outputs._1 }}
milestone: ${{ steps.gitversion.outputs.majorMinorPatch }}
name: 'Release ${{ steps.gitversion.outputs.majorMinorPatch }}'
assets: |
release.zip
- name: Publish release with GitReleaseManager
uses: gittools/actions/gitreleasemanager/[email protected]
with:
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
owner: ${{ steps.repo.outputs._0 }}
repository: ${{ steps.repo.outputs._1 }}
tagName: ${{ steps.gitversion.outputs.majorMinorPatch }}
- name: Close release with GitReleaseManager
uses: gittools/actions/gitreleasemanager/[email protected]
with:
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
owner: ${{ steps.repo.outputs._0 }}
repository: ${{ steps.repo.outputs._1 }}
milestone: ${{ steps.gitversion.outputs.majorMinorPatch }}