mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2025-12-19 14:59:21 +00:00
build: account for differences in commit version names
This commit is contained in:
70
.github/workflows/ci_1.20.1.yml
vendored
Normal file
70
.github/workflows/ci_1.20.1.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
name: CI Tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ 'minecraft/1.20.1' ]
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'workflows/**'
|
||||||
|
- 'README.md'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
checks: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: 'Build - 1.20.1'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: 'Setup JDK 21 📦'
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: '21'
|
||||||
|
distribution: 'temurin'
|
||||||
|
- name: 'Setup Gradle 8.8 🏗️'
|
||||||
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
with:
|
||||||
|
gradle-version: '8.8'
|
||||||
|
- name: 'Checkout for CI 🛎️'
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: 'minecraft/1.20.1'
|
||||||
|
env:
|
||||||
|
SNAPSHOTS_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
|
||||||
|
SNAPSHOTS_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
||||||
|
- name: '[Current - 1.20.1] Build 🛎️'
|
||||||
|
run: |
|
||||||
|
./gradlew clean build publish
|
||||||
|
- name: 'Publish Test Report 📊'
|
||||||
|
uses: mikepenz/action-junit-report@v4
|
||||||
|
if: success() || failure() # Continue on failure
|
||||||
|
with:
|
||||||
|
report_paths: '**/build/test-results/test/TEST-*.xml'
|
||||||
|
- name: 'Fetch Version String 📝'
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=VERSION_NAME::$(./gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')"
|
||||||
|
id: fetch-version
|
||||||
|
- name: 'Set Version Variable 📝'
|
||||||
|
run: |
|
||||||
|
echo "version_name=${{steps.fetch-version.outputs.VERSION_NAME}}" >> $GITHUB_ENV
|
||||||
|
- name: 'Publish to William278.net 🚀'
|
||||||
|
uses: WiIIiam278/bones-publish-action@v1
|
||||||
|
with:
|
||||||
|
api-key: ${{ secrets.BONES_API_KEY }}
|
||||||
|
project: 'husksync'
|
||||||
|
channel: 'alpha'
|
||||||
|
version: ${{ env.version_name }}
|
||||||
|
changelog: ${{ github.event.head_commit.message }}
|
||||||
|
distro-names: |
|
||||||
|
paper-1.20.1
|
||||||
|
fabric-1.20.1
|
||||||
|
distro-groups: |
|
||||||
|
paper
|
||||||
|
fabric
|
||||||
|
distro-descriptions: |
|
||||||
|
Paper 1.20.1
|
||||||
|
Fabric 1.20.1
|
||||||
|
files: |
|
||||||
|
target/HuskSync-Paper-${{ env.version_name }}+mc.1.20.1.jar
|
||||||
|
target/HuskSync-Fabric-${{ env.version_name }}+mc.1.20.1.jar
|
||||||
@@ -14,6 +14,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
name: 'Build - 1.21.1'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Setup JDK 21 📦'
|
- name: 'Setup JDK 21 📦'
|
||||||
@@ -25,31 +26,14 @@ jobs:
|
|||||||
uses: gradle/actions/setup-gradle@v4
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
gradle-version: '8.8'
|
gradle-version: '8.8'
|
||||||
- name: '[Current - 1.21.1] Checkout for CI 🛎️'
|
- name: 'Checkout for CI 🛎️'
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
path: '1_21_1'
|
|
||||||
- name: '[LTS - 1.20.1] Checkout for CI 🛎️'
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: 'minecraft/1.20.1'
|
|
||||||
path: '1_20_1'
|
|
||||||
env:
|
env:
|
||||||
SNAPSHOTS_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
|
SNAPSHOTS_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
|
||||||
SNAPSHOTS_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
SNAPSHOTS_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
||||||
- name: '[Current - 1.21.1] Build 🛎️'
|
- name: '[Current - 1.21.1] Build 🛎️'
|
||||||
run: |
|
run: |
|
||||||
mkdir target
|
|
||||||
cd 1_21_1
|
|
||||||
./gradlew clean build publish
|
./gradlew clean build publish
|
||||||
cp -rf target/* ../target/
|
|
||||||
cd ..
|
|
||||||
- name: '[LTS - 1.20.1] Build 🛎️'
|
|
||||||
run: |
|
|
||||||
cd 1_20_1
|
|
||||||
./gradlew clean build publish
|
|
||||||
cp -rf target/* ../target/
|
|
||||||
cd ..
|
|
||||||
- name: 'Publish Test Report 📊'
|
- name: 'Publish Test Report 📊'
|
||||||
uses: mikepenz/action-junit-report@v4
|
uses: mikepenz/action-junit-report@v4
|
||||||
if: success() || failure() # Continue on failure
|
if: success() || failure() # Continue on failure
|
||||||
@@ -57,13 +41,11 @@ jobs:
|
|||||||
report_paths: '**/build/test-results/test/TEST-*.xml'
|
report_paths: '**/build/test-results/test/TEST-*.xml'
|
||||||
- name: 'Fetch Version String 📝'
|
- name: 'Fetch Version String 📝'
|
||||||
run: |
|
run: |
|
||||||
cd 1_21_1
|
|
||||||
echo "::set-output name=VERSION_NAME::$(./gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')"
|
echo "::set-output name=VERSION_NAME::$(./gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')"
|
||||||
id: fetch-version
|
id: fetch-version
|
||||||
- name: 'Set Version Variable 📝'
|
- name: 'Set Version Variable 📝'
|
||||||
run: |
|
run: |
|
||||||
echo "version_name=${{steps.fetch-version.outputs.VERSION_NAME}}" >> $GITHUB_ENV
|
echo "version_name=${{steps.fetch-version.outputs.VERSION_NAME}}" >> $GITHUB_ENV
|
||||||
cd ${{ github.workspace }}
|
|
||||||
- name: 'Publish to William278.net 🚀'
|
- name: 'Publish to William278.net 🚀'
|
||||||
uses: WiIIiam278/bones-publish-action@v1
|
uses: WiIIiam278/bones-publish-action@v1
|
||||||
with:
|
with:
|
||||||
@@ -75,20 +57,12 @@ jobs:
|
|||||||
distro-names: |
|
distro-names: |
|
||||||
paper-1.21.1
|
paper-1.21.1
|
||||||
fabric-1.21.1
|
fabric-1.21.1
|
||||||
paper-1.20.1
|
|
||||||
fabric-1.20.1
|
|
||||||
distro-groups: |
|
distro-groups: |
|
||||||
paper
|
paper
|
||||||
fabric
|
fabric
|
||||||
paper
|
|
||||||
fabric
|
|
||||||
distro-descriptions: |
|
distro-descriptions: |
|
||||||
Paper 1.21.1
|
Paper 1.21.1
|
||||||
Fabric 1.21.1
|
Fabric 1.21.1
|
||||||
Paper 1.20.1
|
|
||||||
Fabric 1.20.1
|
|
||||||
files: |
|
files: |
|
||||||
target/HuskSync-Paper-${{ env.version_name }}+mc.1.21.1.jar
|
target/HuskSync-Paper-${{ env.version_name }}+mc.1.21.1.jar
|
||||||
target/HuskSync-Fabric-${{ env.version_name }}+mc.1.21.1.jar
|
target/HuskSync-Fabric-${{ env.version_name }}+mc.1.21.1.jar
|
||||||
target/HuskSync-Paper-${{ env.version_name }}+mc.1.20.1.jar
|
|
||||||
target/HuskSync-Fabric-${{ env.version_name }}+mc.1.20.1.jar
|
|
||||||
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -11,6 +11,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
name: 'Publish Release'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Setup JDK 21 📦'
|
- name: 'Setup JDK 21 📦'
|
||||||
@@ -38,13 +39,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir target
|
mkdir target
|
||||||
cd 1_21_1
|
cd 1_21_1
|
||||||
./gradlew clean build publish
|
./gradlew clean build publish -Dforce-hide-version-meta=1
|
||||||
cp -rf target/* ../target/
|
cp -rf target/* ../target/
|
||||||
cd ..
|
cd ..
|
||||||
- name: '[LTS - 1.20.1] Build 🛎️'
|
- name: '[LTS - 1.20.1] Build 🛎️'
|
||||||
run: |
|
run: |
|
||||||
cd 1_20_1
|
cd 1_20_1
|
||||||
./gradlew clean build publish
|
./gradlew clean build publish -Dforce-hide-version-meta=1
|
||||||
cp -rf target/* ../target/
|
cp -rf target/* ../target/
|
||||||
cd ..
|
cd ..
|
||||||
- name: 'Publish Test Report 📊'
|
- name: 'Publish Test Report 📊'
|
||||||
|
|||||||
3
.github/workflows/update_docs.yml
vendored
3
.github/workflows/update_docs.yml
vendored
@@ -13,7 +13,8 @@ permissions:
|
|||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy-wiki:
|
update-docs:
|
||||||
|
name: 'Update Docs'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout for CI 🛎️'
|
- name: 'Checkout for CI 🛎️'
|
||||||
|
|||||||
@@ -196,6 +196,11 @@ logger.lifecycle("Building HuskSync ${version} by William278 for Minecraft ${min
|
|||||||
|
|
||||||
@SuppressWarnings('GrMethodMayBeStatic')
|
@SuppressWarnings('GrMethodMayBeStatic')
|
||||||
def versionMetadata() {
|
def versionMetadata() {
|
||||||
|
// If the force-hide-version-meta environment variable is set, return ''
|
||||||
|
if (System.getenv('force-hide-version-meta') != null) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
|
||||||
// Require grgit
|
// Require grgit
|
||||||
if (grgit == null) {
|
if (grgit == null) {
|
||||||
return '-unknown'
|
return '-unknown'
|
||||||
|
|||||||
Reference in New Issue
Block a user