1
- name : CI-develop
1
+ name : PreRelease
2
2
3
3
on :
4
- push :
5
- branches : [ develop ]
4
+ pull_request :
5
+ types : [closed ]
6
6
workflow_dispatch :
7
-
7
+
8
8
jobs :
9
9
version :
10
+ if : github.event.pull_request.merged == true
10
11
runs-on : ubuntu-latest
11
12
outputs :
12
13
version : ${{ steps.semvers.outputs.patch }}
14
+ changelog : ${{ steps.Changelog.outputs.changelog }}
13
15
steps :
14
16
- uses : actions/checkout@v2
15
17
16
- - run : git fetch --prune --unshallow --tags
18
+ - run : git fetch --prune --unshallow --tags
17
19
18
20
- uses : docker://agilepathway/pull-request-label-checker:latest
19
21
with :
20
22
one_of : pre-release
21
- repo_token : ${{ secrets.GITHUB_TOKEN }}
23
+ repo_token : ${{ secrets.GITHUB_TOKEN }}
22
24
23
25
- name : ' Get Previous tag'
24
26
id : previoustag
28
30
id : semvers
29
31
uses : " WyriHaximus/github-action-next-semvers@v1"
30
32
with :
31
- version : ${{ steps.previoustag.outputs.tag }}
33
+ version : ${{ steps.previoustag.outputs.tag }}
34
+
32
35
- name : ' Create changelog'
33
36
id : Changelog
34
37
run : |
38
41
changelog="${changelog//$'\n'/'%0A'}"
39
42
changelog="${changelog//$'\r'/'%0D'}"
40
43
echo "$changelog"
41
- echo "::set-output name=changelog::$changelog"
44
+ echo "::set-output name=changelog::$changelog"
45
+
42
46
build :
43
47
runs-on : windows-latest
44
48
needs : version
53
57
54
58
- name : Navigate to Workspace
55
59
run : cd $GITHUB_WORKSPACE
56
-
60
+
57
61
- name : Get cache
58
62
uses : actions/cache@v2
59
63
with :
@@ -65,11 +69,12 @@ jobs:
65
69
key : ${{ runner.os }}-nuget-${{ hashFiles('TbsCore/packages.lock.json') }}
66
70
restore-keys : |
67
71
${{ runner.os }}-nuget-
72
+
68
73
- name : Restore Packages
69
74
run : |
70
75
nuget restore TbsCore/TbsCore.csproj -PackagesDirectory packages
71
76
nuget restore TravBotSharp/TbsWinForms.csproj -PackagesDirectory packages
72
-
77
+
73
78
- name : Build Bot
74
79
run : |
75
80
msbuild.exe TravBotSharp.sln /t:TbsWinForms /nologo /nr:false /p:DeleteExistingFiles=True /p:platform="Any CPU" /p:configuration="Release" /m /p:BuildProjectReferences=true /p:BUILD_NUMBER=${{needs.version.outputs.version}}.0
80
85
name : TBS-prerelease
81
86
path : TravBotSharp\bin\Release
82
87
if-no-files-found : error
88
+
83
89
prerelease :
84
90
runs-on : ubuntu-latest
85
91
needs : [build, version]
96
102
with :
97
103
files : TravBotSharp/bin/Release
98
104
dest : TBS-${{needs.version.outputs.version}}.zip
99
-
105
+
100
106
- name : Create pre release
101
107
uses : ncipollo/release-action@v1
102
108
with :
@@ -107,8 +113,9 @@ jobs:
107
113
body : |
108
114
**Changelog**:
109
115
${{needs.version.outputs.changelog}}
116
+
110
117
artifacts : TBS-${{needs.version.outputs.version}}.zip
111
- token : ${{ secrets.GITHUB_TOKEN }}
118
+ token : ${{ secrets.GITHUB_TOKEN }}
112
119
Discord :
113
120
runs-on : ubuntu-latest
114
121
needs : [prerelease, version]
@@ -117,15 +124,14 @@ jobs:
117
124
uses : sarisia/actions-status-discord@v1
118
125
with :
119
126
webhook : ${{ secrets.DISCORD_PRE_BOT }}
120
- nodetail : true
121
127
title : New pre-release
128
+ nodetail : true
122
129
description : |
123
- ** Version**: `TBS-${{needs.version.outputs.version}}`
130
+ Version `TBS-${{needs.version.outputs.version}}`
124
131
Click [here](https://github.com/Erol444/TravianBotSharp/releases/tag/${{needs.version.outputs.version}}) to download!
132
+
125
133
**Changelog**:
126
134
${{needs.version.outputs.changelog}}
127
-
128
-
129
135
Clear :
130
136
runs-on : ubuntu-latest
131
137
needs : prerelease
@@ -134,6 +140,3 @@ jobs:
134
140
uses : geekyeggo/delete-artifact@v1
135
141
with :
136
142
name : TBS-prerelease
137
-
138
-
139
-
0 commit comments