1
- name : PreReleaseFlow
1
+ name : HotfixFlow
2
2
3
3
on :
4
4
pull_request :
5
- branches :
6
- - ' releases/**'
5
+ branches : [master]
7
6
types : [closed]
8
- workflow_dispatch :
9
7
10
8
jobs :
11
9
version :
12
10
if : github.event.pull_request.merged == true
13
11
runs-on : ubuntu-latest
14
12
outputs :
15
13
version : ${{ steps.semvers.outputs.patch }}
14
+ changelog : ${{ steps.Changelog.outputs.changelog }}
15
+
16
16
steps :
17
17
- uses : docker://agilepathway/pull-request-label-checker:latest
18
18
with :
19
- one_of : pre-release
19
+ one_of : hotfix
20
20
repo_token : ${{ secrets.GITHUB_TOKEN }}
21
21
22
22
- name : ' Checkout repo'
34
34
uses : " WyriHaximus/github-action-next-semvers@v1"
35
35
with :
36
36
version : ${{ steps.previoustag.outputs.tag }}
37
+
38
+ - name : ' Create changelog'
39
+ id : Changelog
40
+ run : |
41
+ changelog="${{github.event.pull_request.body}}"
42
+ changelog="${changelog//'%'/'%25'}"
43
+ changelog="${changelog//$'\n'/'%0A'}"
44
+ changelog="${changelog//$'\r'/'%0D'}"
45
+ echo "::set-output name=changelog::$changelog"
37
46
38
47
build :
39
48
runs-on : windows-2019
63
72
path : WPFUI\bin\Release\net6.0-windows\win-x86\publish\
64
73
if-no-files-found : error
65
74
66
- prerelease :
75
+ release :
67
76
runs-on : ubuntu-latest
68
77
needs : [build, version]
69
78
steps :
@@ -72,42 +81,48 @@ jobs:
72
81
with :
73
82
path : TBS
74
83
75
- - name : Archive pre release
84
+ - name : Archive release
76
85
run : |
77
86
cd TBS; zip -r "TBS-${{needs.version.outputs.version}}-TravianOfficial-OldHeroUI.zip" TBS-TRAVIAN_OFFICIAL; cp -R "TBS-${{needs.version.outputs.version}}-TravianOfficial-OldHeroUI.zip" ../; cd ..
78
87
cd TBS; zip -r "TBS-${{needs.version.outputs.version}}-TravianOfficial-NewHeroUI.zip" TBS-TRAVIAN_OFFICIAL_HEROUI; cp -R "TBS-${{needs.version.outputs.version}}-TravianOfficial-NewHeroUI.zip" ../; cd ..
79
88
cd TBS; zip -r "TBS-${{needs.version.outputs.version}}-TTWars.zip" TBS-TTWARS; cp -R "TBS-${{needs.version.outputs.version}}-TTWars.zip" ../; cd ..
80
89
81
- - name : Create pre release
90
+ - name : Create release
82
91
uses : ncipollo/release-action@v1
83
92
with :
84
93
name : TBS-${{needs.version.outputs.version}}
85
- prerelease : true
86
94
tag : ${{needs.version.outputs.version}}
87
- commit : develop
95
+ commit : master
88
96
artifacts : " TBS-${{needs.version.outputs.version}}-TravianOfficial-OldHeroUI.zip, TBS-${{needs.version.outputs.version}}-TravianOfficial-NewHeroUI.zip, TBS-${{needs.version.outputs.version}}-TTWars.zip"
89
97
token : ${{ secrets.GITHUB_TOKEN }}
90
98
body : |
91
- This is pre-release version of TBS. Please report any bugs you found.
92
99
Please join our Discord server for more information: [https://discord.gg/mBa4f2K](https://discord.gg/mBa4f2K)
93
-
94
-
100
+
101
+ **Changelog**:
102
+ ${{needs.version.outputs.changelog}}
103
+
95
104
Discord :
96
105
runs-on : ubuntu-latest
97
- needs : [prerelease, version]
98
- steps :
106
+ needs : [release, version]
107
+ steps :
108
+ - name : Ping @everyone
109
+ run : |
110
+ curl --header "Content-Type: application/json" --data "{\"content\": \"@everyone\"}" "${{ secrets.DISCORD_BOT }}"
99
111
- name : Send to discord server
100
112
uses : sarisia/actions-status-discord@v1
101
113
with :
102
- webhook : ${{ secrets.DISCORD_PRE_BOT }}
103
- title : New pre-release
104
- nodetail : true
114
+ webhook : ${{ secrets.DISCORD_BOT }}
115
+ title : New hotfix
116
+ nodetail : true
105
117
description : |
106
118
Version `TBS-${{needs.version.outputs.version}}`
107
- Click [here](https://github.com/Erol444/TravianBotSharp/releases/tag/${{needs.version.outputs.version}}) to download
119
+ Click [here](https://github.com/Erol444/TravianBotSharp/releases/tag/${{needs.version.outputs.version}}) to download!
120
+
121
+ **Changelog**:
122
+ ${{needs.version.outputs.changelog}}
108
123
Clear :
109
124
runs-on : ubuntu-latest
110
- needs : prerelease
125
+ needs : release
111
126
strategy :
112
127
matrix :
113
128
server : [TRAVIAN_OFFICIAL, TRAVIAN_OFFICIAL_HEROUI, TTWARS]
0 commit comments