Skip to content

Commit b5e489a

Browse files
authored
Update and rename pre-release.yml to hotfix.yml
1 parent ead7da2 commit b5e489a

File tree

1 file changed

+35
-20
lines changed

1 file changed

+35
-20
lines changed

.github/workflows/pre-release.yml renamed to .github/workflows/hotfix.yml

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
name: PreReleaseFlow
1+
name: HotfixFlow
22

33
on:
44
pull_request:
5-
branches:
6-
- 'releases/**'
5+
branches: [master]
76
types: [closed]
8-
workflow_dispatch:
97

108
jobs:
119
version:
1210
if: github.event.pull_request.merged == true
1311
runs-on: ubuntu-latest
1412
outputs:
1513
version: ${{ steps.semvers.outputs.patch }}
14+
changelog: ${{ steps.Changelog.outputs.changelog }}
15+
1616
steps:
1717
- uses: docker://agilepathway/pull-request-label-checker:latest
1818
with:
19-
one_of: pre-release
19+
one_of: hotfix
2020
repo_token: ${{ secrets.GITHUB_TOKEN }}
2121

2222
- name: 'Checkout repo'
@@ -34,6 +34,15 @@ jobs:
3434
uses: "WyriHaximus/github-action-next-semvers@v1"
3535
with:
3636
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"
3746
3847
build:
3948
runs-on: windows-2019
@@ -63,7 +72,7 @@ jobs:
6372
path: WPFUI\bin\Release\net6.0-windows\win-x86\publish\
6473
if-no-files-found: error
6574

66-
prerelease:
75+
release:
6776
runs-on: ubuntu-latest
6877
needs: [build, version]
6978
steps:
@@ -72,42 +81,48 @@ jobs:
7281
with:
7382
path: TBS
7483

75-
- name: Archive pre release
84+
- name: Archive release
7685
run: |
7786
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 ..
7887
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 ..
7988
cd TBS; zip -r "TBS-${{needs.version.outputs.version}}-TTWars.zip" TBS-TTWARS; cp -R "TBS-${{needs.version.outputs.version}}-TTWars.zip" ../; cd ..
8089
81-
- name: Create pre release
90+
- name: Create release
8291
uses: ncipollo/release-action@v1
8392
with:
8493
name: TBS-${{needs.version.outputs.version}}
85-
prerelease: true
8694
tag: ${{needs.version.outputs.version}}
87-
commit: develop
95+
commit: master
8896
artifacts: "TBS-${{needs.version.outputs.version}}-TravianOfficial-OldHeroUI.zip, TBS-${{needs.version.outputs.version}}-TravianOfficial-NewHeroUI.zip, TBS-${{needs.version.outputs.version}}-TTWars.zip"
8997
token: ${{ secrets.GITHUB_TOKEN }}
9098
body: |
91-
This is pre-release version of TBS. Please report any bugs you found.
9299
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+
95104
Discord:
96105
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 }}"
99111
- name: Send to discord server
100112
uses: sarisia/actions-status-discord@v1
101113
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
105117
description: |
106118
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}}
108123
Clear:
109124
runs-on: ubuntu-latest
110-
needs: prerelease
125+
needs: release
111126
strategy:
112127
matrix:
113128
server: [TRAVIAN_OFFICIAL, TRAVIAN_OFFICIAL_HEROUI, TTWARS]

0 commit comments

Comments
 (0)