aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorKevinthegreat <92656833+kevinthegreat1@users.noreply.github.com>2024-06-10 16:19:10 +0800
committerKevinthegreat <92656833+kevinthegreat1@users.noreply.github.com>2024-06-10 16:19:10 +0800
commitfc4a20a39024471f16f78c90cfbfbd37ee7396b7 (patch)
tree16278488a7e3756a0676d7c18ed2bb2bafd5525a /.github/workflows
parentebd5ccd1620c7857c621f9c04b1f87ab11c08cbc (diff)
downloadSkyblocker-fc4a20a39024471f16f78c90cfbfbd37ee7396b7.tar.gz
Skyblocker-fc4a20a39024471f16f78c90cfbfbd37ee7396b7.tar.bz2
Skyblocker-fc4a20a39024471f16f78c90cfbfbd37ee7396b7.zip
Update jar name and add build type
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/beta.yml13
1 files changed, 12 insertions, 1 deletions
diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml
index e1d3427c..64a4b2f9 100644
--- a/.github/workflows/beta.yml
+++ b/.github/workflows/beta.yml
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
+ - bleeding-edge
paths-ignore:
- 'src/main/resources/assets/skyblocker/lang/**'
- 'CHANGELOG.md'
@@ -16,6 +17,9 @@ on:
- 'CHANGELOG.md'
- 'FEATURES.md'
- 'README.md'
+env:
+ REF_NAME: ${{ github.ref_name }}
+ PR_NUMBER: ${{ github.event.number }}
jobs:
# This workflow contains a single job called "build"
@@ -31,9 +35,16 @@ jobs:
with:
result-encoding: string
script: |
+ let buildType;
+ if (!process.env.PR_NUMBER) {
+ buildType = process.env.REF_NAME === "bleeding-edge" ? "alpha" : "beta";
+ } else {
+ buildType = `pr-${process.env.PR_NUMBER}`;
+ }
+
const fs = require("fs");
let file = fs.readFileSync("./gradle.properties");
- file = file.toString().split("\n").map(e => e.trim().startsWith("mod_version") ? `${e}-beta-${process.env.GITHUB_SHA.substring(0, 7)}` : e).join("\n");
+ file = file.toString().split("\n").map(e => e.trim().startsWith("mod_version") ? `${e}-${buildType}-${process.env.GITHUB_SHA.substring(0, 7)}` : e).join("\n");
fs.writeFileSync("./gradle.properties", file);
- name: Set up JDK 21