mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2025-12-23 00:29:18 +00:00
build: update CI to publish all active versions
This commit is contained in:
43
.github/workflows/ci.yml
vendored
43
.github/workflows/ci.yml
vendored
@@ -16,20 +16,37 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout for CI 🛎️'
|
- name: 'Setup JDK 21 📦'
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: 'Set up JDK 21 📦'
|
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: '21'
|
java-version: '21'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
- name: 'Build with Gradle 🏗️'
|
- name: 'Setup Gradle 8.8 🏗️'
|
||||||
uses: gradle/gradle-build-action@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
arguments: build test publish
|
gradle-version: '8.8'
|
||||||
|
- name: '[Current - 1.21.1] Checkout for CI 🛎️'
|
||||||
|
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 🛎️'
|
||||||
|
run: |
|
||||||
|
cd 1.21.1
|
||||||
|
./gradlew clean build publish
|
||||||
|
cd ..
|
||||||
|
- name: '[LTS - 1.20.1] Build 🛎️'
|
||||||
|
run: |
|
||||||
|
cd 1.20.1
|
||||||
|
./gradlew clean build publish
|
||||||
|
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
|
||||||
@@ -37,11 +54,13 @@ jobs:
|
|||||||
report_paths: '**/build/test-results/test/TEST-*.xml'
|
report_paths: '**/build/test-results/test/TEST-*.xml'
|
||||||
- name: 'Fetch Version Name 📝'
|
- name: 'Fetch Version Name 📝'
|
||||||
run: |
|
run: |
|
||||||
|
cd 1.21.1
|
||||||
echo "::set-output name=VERSION_NAME::$(${{github.workspace}}/gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')"
|
echo "::set-output name=VERSION_NAME::$(${{github.workspace}}/gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')"
|
||||||
id: fetch-version
|
id: fetch-version
|
||||||
- name: Get Version
|
- name: Get Version
|
||||||
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 ..
|
||||||
- name: 'Publish to William278.net 🚀'
|
- name: 'Publish to William278.net 🚀'
|
||||||
uses: WiIIiam278/bones-publish-action@v1
|
uses: WiIIiam278/bones-publish-action@v1
|
||||||
with:
|
with:
|
||||||
@@ -53,12 +72,20 @@ 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
|
1.21.1/target/HuskSync-Paper-${{ env.version_name }}+mc.1.21.1.jar
|
||||||
target/HuskSync-Fabric-${{ env.version_name }}+mc.1.21.1.jar
|
1.21.1/target/HuskSync-Fabric-${{ env.version_name }}+mc.1.21.1.jar
|
||||||
|
1.20.1/target/HuskSync-Paper-${{ env.version_name }}+mc.1.20.1.jar
|
||||||
|
1.20.1/target/HuskSync-Fabric-${{ env.version_name }}+mc.1.20.1.jar
|
||||||
58
.github/workflows/release.yml
vendored
58
.github/workflows/release.yml
vendored
@@ -8,26 +8,72 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
checks: write
|
checks: write
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout for CI 🛎️'
|
- name: 'Setup JDK 21 📦'
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: 'Set up JDK 21 📦'
|
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: '21'
|
java-version: '21'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
- name: 'Build with Gradle 🏗️'
|
- name: 'Setup Gradle 8.8 🏗️'
|
||||||
uses: gradle/gradle-build-action@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
with:
|
with:
|
||||||
arguments: build test publish
|
gradle-version: '8.8'
|
||||||
|
- name: '[Current - 1.21.1] Checkout for CI 🛎️'
|
||||||
|
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:
|
||||||
RELEASES_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
|
RELEASES_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
|
||||||
RELEASES_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
RELEASES_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
||||||
|
- name: '[Current - 1.21.1] Build 🛎️'
|
||||||
|
run: |
|
||||||
|
cd 1.21.1
|
||||||
|
./gradlew clean build publish
|
||||||
|
cd ..
|
||||||
|
- name: '[LTS - 1.20.1] Build 🛎️'
|
||||||
|
run: |
|
||||||
|
cd 1.20.1
|
||||||
|
./gradlew clean build publish
|
||||||
|
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
|
||||||
with:
|
with:
|
||||||
report_paths: '**/build/test-results/test/TEST-*.xml'
|
report_paths: '**/build/test-results/test/TEST-*.xml'
|
||||||
|
- name: 'Publish to William278.net 🚀'
|
||||||
|
uses: WiIIiam278/bones-publish-action@v1
|
||||||
|
with:
|
||||||
|
api-key: ${{ secrets.BONES_API_KEY }}
|
||||||
|
project: 'husksync'
|
||||||
|
channel: 'release'
|
||||||
|
version: ${{ github.event.release.tag_name }}
|
||||||
|
changelog: ${{ github.event.release.body }}
|
||||||
|
distro-names: |
|
||||||
|
paper-1.21.1
|
||||||
|
fabric-1.21.1
|
||||||
|
paper-1.20.1
|
||||||
|
fabric-1.20.1
|
||||||
|
distro-groups: |
|
||||||
|
paper
|
||||||
|
fabric
|
||||||
|
paper
|
||||||
|
fabric
|
||||||
|
distro-descriptions: |
|
||||||
|
Paper 1.21.1
|
||||||
|
Fabric 1.21.1
|
||||||
|
Paper 1.20.1
|
||||||
|
Fabric 1.20.1
|
||||||
|
files: |
|
||||||
|
1.21.1/target/HuskSync-Paper-${{ github.event.release.tag_name }}+mc.1.21.1.jar
|
||||||
|
1.21.1/target/HuskSync-Fabric-${{ github.event.release.tag_name }}+mc.1.21.1.jar
|
||||||
|
1.20.1/target/HuskSync-Paper-${{ github.event.release.tag_name }}+mc.1.20.1.jar
|
||||||
|
1.20.1/target/HuskSync-Fabric-${{ github.event.release.tag_name }}+mc.1.20.1.jar
|
||||||
Reference in New Issue
Block a user