From 409ccdeaddf7981077bb9f858062799f74c707fe Mon Sep 17 00:00:00 2001 From: LlmDl Date: Mon, 16 Mar 2026 09:09:08 -0500 Subject: [PATCH 1/5] Add checkout step to deploy_prerelease workflow Added a step to checkout repository content in the workflow. --- .github/workflows/deploy_prerelease.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy_prerelease.yml b/.github/workflows/deploy_prerelease.yml index 37d1f99160..781660b97a 100644 --- a/.github/workflows/deploy_prerelease.yml +++ b/.github/workflows/deploy_prerelease.yml @@ -30,6 +30,8 @@ jobs: runs-on: ubuntu-latest name: Prepare Prerelease Body steps: + - name: checkout repo content + uses: actions/checkout@v3 # checkout the repository content to github runner. - name: setup python uses: actions/setup-python@v3 with: From 052370525fb9d80b967219f662cc662b282ace06 Mon Sep 17 00:00:00 2001 From: LlmDl Date: Mon, 16 Mar 2026 09:29:57 -0500 Subject: [PATCH 2/5] Refactor GitHub Actions workflow for prerelease --- .github/workflows/deploy_prerelease.yml | 62 ++++++++++++++++--------- 1 file changed, 41 insertions(+), 21 deletions(-) diff --git a/.github/workflows/deploy_prerelease.yml b/.github/workflows/deploy_prerelease.yml index 781660b97a..7d64464c26 100644 --- a/.github/workflows/deploy_prerelease.yml +++ b/.github/workflows/deploy_prerelease.yml @@ -5,6 +5,31 @@ env: CURR_VER: 0.0.0.0 SUPPORTED: " for MC 1.19.* & 1.20.* & 1.21.*" jobs: + prepare_prerelease_body: + needs: checkout_and_compile + runs-on: ubuntu-latest + name: Prepare Prerelease Body + steps: + - name: checkout repo content + uses: actions/checkout@v3 # checkout the repository content to github runner. + - name: setup python + uses: actions/setup-python@v3 + with: + python-version: 3.8 #install the python needed + - name: create sponsors.txt + run: python ./.github/workflows/prerelease/get_sponsors.py + - name: create staging dir + run: mkdir staging && cp sponsors.txt staging + - name: execute sponsortable.py + run: python ./.github/workflows/prerelease/sponsortable.py + - name: execute preRelease.py + id: prerelease_py + run: python ./.github/workflows/prerelease/prerelease.py + - name: save txt + uses: actions/upload-artifact@v4 + with: + name: prerelease.txt + path: ./staging/ checkout_and_compile: runs-on: ubuntu-latest strategy: @@ -25,41 +50,36 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: mvn -B clean package -DskipTests=false - prepare_prerelease_body: - needs: checkout_and_compile - runs-on: ubuntu-latest - name: Prepare Prerelease Body - steps: - - name: checkout repo content - uses: actions/checkout@v3 # checkout the repository content to github runner. - - name: setup python - uses: actions/setup-python@v3 + - name: save jar + uses: actions/upload-artifact@v4 with: - python-version: 3.8 #install the python needed - - name: create sponsors.txt - run: python ./.github/workflows/prerelease/get_sponsors.py - - name: create staging dir - run: mkdir staging && cp sponsors.txt staging - - name: execute sponsortable.py - run: python ./.github/workflows/prerelease/sponsortable.py - - name: execute preRelease.py - id: prerelease_py - run: python ./.github/workflows/prerelease/prerelease.py + name: towny-${{ env.CURR_VER }}.jar + path: ./Towny/target/ publish_prerelease: needs: [checkout_and_compile, prepare_prerelease_body] runs-on: ubuntu-latest name: Publish Prerelease steps: + - name: load towny jar + uses: actions/download-artifact@v4 + with: + name: towny-${{ env.CURR_VER }}.jar + path: ./ + - name: load prerelease.txt + uses: actions/download-artifact@v4 + with: + name: prerelease.txt + path: ./ - name: create pre-release uses: softprops/action-gh-release@v1 with: - body_path: ./staging/prerelease.txt + body_path: ./prerelease.txt prerelease: true draft: true token: ${{ github.token }} tag_name: ${{ env.CURR_VER }} name: ${{ env.CURR_VER }}${{ env.SUPPORTED }} files: | - ./Towny/target/towny-${{ env.CURR_VER }}.jar + ./towny-${{ env.CURR_VER }}.jar env: GITHUB_REPOSITORY: my_gh_org/my_gh_repo From d72f641fb2047b9884120d21430c54acb9ed305d Mon Sep 17 00:00:00 2001 From: LlmDl Date: Mon, 16 Mar 2026 09:31:23 -0500 Subject: [PATCH 3/5] Update job dependencies in deploy_prerelease.yml --- .github/workflows/deploy_prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_prerelease.yml b/.github/workflows/deploy_prerelease.yml index 7d64464c26..d1107f3399 100644 --- a/.github/workflows/deploy_prerelease.yml +++ b/.github/workflows/deploy_prerelease.yml @@ -6,7 +6,6 @@ env: SUPPORTED: " for MC 1.19.* & 1.20.* & 1.21.*" jobs: prepare_prerelease_body: - needs: checkout_and_compile runs-on: ubuntu-latest name: Prepare Prerelease Body steps: @@ -31,6 +30,7 @@ jobs: name: prerelease.txt path: ./staging/ checkout_and_compile: + needs: prepare_prerelease_body runs-on: ubuntu-latest strategy: matrix: From 37af18f15162ca979b8cee063ca45865f5f002be Mon Sep 17 00:00:00 2001 From: LlmDl Date: Mon, 16 Mar 2026 09:54:24 -0500 Subject: [PATCH 4/5] Scrap concept of using separate jobs/VMs --- .github/workflows/deploy_prerelease.yml | 66 +++++++------------------ 1 file changed, 18 insertions(+), 48 deletions(-) diff --git a/.github/workflows/deploy_prerelease.yml b/.github/workflows/deploy_prerelease.yml index d1107f3399..51aef343bb 100644 --- a/.github/workflows/deploy_prerelease.yml +++ b/.github/workflows/deploy_prerelease.yml @@ -5,37 +5,13 @@ env: CURR_VER: 0.0.0.0 SUPPORTED: " for MC 1.19.* & 1.20.* & 1.21.*" jobs: - prepare_prerelease_body: - runs-on: ubuntu-latest - name: Prepare Prerelease Body - steps: - - name: checkout repo content - uses: actions/checkout@v3 # checkout the repository content to github runner. - - name: setup python - uses: actions/setup-python@v3 - with: - python-version: 3.8 #install the python needed - - name: create sponsors.txt - run: python ./.github/workflows/prerelease/get_sponsors.py - - name: create staging dir - run: mkdir staging && cp sponsors.txt staging - - name: execute sponsortable.py - run: python ./.github/workflows/prerelease/sponsortable.py - - name: execute preRelease.py - id: prerelease_py - run: python ./.github/workflows/prerelease/prerelease.py - - name: save txt - uses: actions/upload-artifact@v4 - with: - name: prerelease.txt - path: ./staging/ - checkout_and_compile: - needs: prepare_prerelease_body + build_towny_and_publish_prerelease: runs-on: ubuntu-latest + strategy: matrix: java: ['21'] - name: Checkout and Compile Towny + name: Build Towny and Publish Pre-Release steps: - name: checkout repo content uses: actions/checkout@v3 # checkout the repository content to github runner. @@ -50,36 +26,30 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: mvn -B clean package -DskipTests=false - - name: save jar - uses: actions/upload-artifact@v4 - with: - name: towny-${{ env.CURR_VER }}.jar - path: ./Towny/target/ - publish_prerelease: - needs: [checkout_and_compile, prepare_prerelease_body] - runs-on: ubuntu-latest - name: Publish Prerelease - steps: - - name: load towny jar - uses: actions/download-artifact@v4 - with: - name: towny-${{ env.CURR_VER }}.jar - path: ./ - - name: load prerelease.txt - uses: actions/download-artifact@v4 + + - name: setup python + uses: actions/setup-python@v3 with: - name: prerelease.txt - path: ./ + python-version: 3.8 #install the python needed + - name: create sponsors.txt + run: python ./.github/workflows/prerelease/get_sponsors.py + - name: create staging dir + run: mkdir staging && cp sponsors.txt staging + - name: execute sponsortable.py + run: python ./.github/workflows/prerelease/sponsortable.py + - name: execute prerelease.py + id: prerelease_py + run: python ./.github/workflows/prerelease/prerelease.py - name: create pre-release uses: softprops/action-gh-release@v1 with: - body_path: ./prerelease.txt + body_path: ./staging/prerelease.txt prerelease: true draft: true token: ${{ github.token }} tag_name: ${{ env.CURR_VER }} name: ${{ env.CURR_VER }}${{ env.SUPPORTED }} files: | - ./towny-${{ env.CURR_VER }}.jar + ./Towny/target/towny-${{ env.CURR_VER }}.jar env: GITHUB_REPOSITORY: my_gh_org/my_gh_repo From 9ad375a24699143c0b80397f9f4734d309eb3d6d Mon Sep 17 00:00:00 2001 From: LlmDl Date: Mon, 16 Mar 2026 09:54:49 -0500 Subject: [PATCH 5/5] Remove draft setting Removed draft option from GitHub release action. --- .github/workflows/deploy_prerelease.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy_prerelease.yml b/.github/workflows/deploy_prerelease.yml index 51aef343bb..4c68342a73 100644 --- a/.github/workflows/deploy_prerelease.yml +++ b/.github/workflows/deploy_prerelease.yml @@ -45,7 +45,6 @@ jobs: with: body_path: ./staging/prerelease.txt prerelease: true - draft: true token: ${{ github.token }} tag_name: ${{ env.CURR_VER }} name: ${{ env.CURR_VER }}${{ env.SUPPORTED }}