Skip to content

Commit 37af18f

Browse files
authored
Scrap concept of using separate jobs/VMs
1 parent d72f641 commit 37af18f

File tree

1 file changed

+18
-48
lines changed

1 file changed

+18
-48
lines changed

.github/workflows/deploy_prerelease.yml

Lines changed: 18 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,13 @@ env:
55
CURR_VER: 0.0.0.0
66
SUPPORTED: " for MC 1.19.* & 1.20.* & 1.21.*"
77
jobs:
8-
prepare_prerelease_body:
9-
runs-on: ubuntu-latest
10-
name: Prepare Prerelease Body
11-
steps:
12-
- name: checkout repo content
13-
uses: actions/checkout@v3 # checkout the repository content to github runner.
14-
- name: setup python
15-
uses: actions/setup-python@v3
16-
with:
17-
python-version: 3.8 #install the python needed
18-
- name: create sponsors.txt
19-
run: python ./.github/workflows/prerelease/get_sponsors.py
20-
- name: create staging dir
21-
run: mkdir staging && cp sponsors.txt staging
22-
- name: execute sponsortable.py
23-
run: python ./.github/workflows/prerelease/sponsortable.py
24-
- name: execute preRelease.py
25-
id: prerelease_py
26-
run: python ./.github/workflows/prerelease/prerelease.py
27-
- name: save txt
28-
uses: actions/upload-artifact@v4
29-
with:
30-
name: prerelease.txt
31-
path: ./staging/
32-
checkout_and_compile:
33-
needs: prepare_prerelease_body
8+
build_towny_and_publish_prerelease:
349
runs-on: ubuntu-latest
10+
3511
strategy:
3612
matrix:
3713
java: ['21']
38-
name: Checkout and Compile Towny
14+
name: Build Towny and Publish Pre-Release
3915
steps:
4016
- name: checkout repo content
4117
uses: actions/checkout@v3 # checkout the repository content to github runner.
@@ -50,36 +26,30 @@ jobs:
5026
env:
5127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5228
run: mvn -B clean package -DskipTests=false
53-
- name: save jar
54-
uses: actions/upload-artifact@v4
55-
with:
56-
name: towny-${{ env.CURR_VER }}.jar
57-
path: ./Towny/target/
58-
publish_prerelease:
59-
needs: [checkout_and_compile, prepare_prerelease_body]
60-
runs-on: ubuntu-latest
61-
name: Publish Prerelease
62-
steps:
63-
- name: load towny jar
64-
uses: actions/download-artifact@v4
65-
with:
66-
name: towny-${{ env.CURR_VER }}.jar
67-
path: ./
68-
- name: load prerelease.txt
69-
uses: actions/download-artifact@v4
29+
30+
- name: setup python
31+
uses: actions/setup-python@v3
7032
with:
71-
name: prerelease.txt
72-
path: ./
33+
python-version: 3.8 #install the python needed
34+
- name: create sponsors.txt
35+
run: python ./.github/workflows/prerelease/get_sponsors.py
36+
- name: create staging dir
37+
run: mkdir staging && cp sponsors.txt staging
38+
- name: execute sponsortable.py
39+
run: python ./.github/workflows/prerelease/sponsortable.py
40+
- name: execute prerelease.py
41+
id: prerelease_py
42+
run: python ./.github/workflows/prerelease/prerelease.py
7343
- name: create pre-release
7444
uses: softprops/action-gh-release@v1
7545
with:
76-
body_path: ./prerelease.txt
46+
body_path: ./staging/prerelease.txt
7747
prerelease: true
7848
draft: true
7949
token: ${{ github.token }}
8050
tag_name: ${{ env.CURR_VER }}
8151
name: ${{ env.CURR_VER }}${{ env.SUPPORTED }}
8252
files: |
83-
./towny-${{ env.CURR_VER }}.jar
53+
./Towny/target/towny-${{ env.CURR_VER }}.jar
8454
env:
8555
GITHUB_REPOSITORY: my_gh_org/my_gh_repo

0 commit comments

Comments
 (0)