Fixup publishing scripts, sponge building

This commit is contained in:
William committed 2023-07-02 16:05:38 +01:00
1 parent c9f5262292
commit 3a185a8d16
28 files changed
+41 -51

No files matched your search

+21 -26
View File
@@ -17,32 +17,33 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - name: 'Checkout for CI 🛎️'
- name: Set up JDK 17 uses: actions/checkout@v3
- name: 'Set up JDK 17 📦'
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
java-version: '17' java-version: '17'
distribution: 'temurin' distribution: 'temurin'
- name: Build with Gradle - name: 'Build with Gradle 🏗️'
uses: gradle/gradle-build-action@v2 uses: gradle/gradle-build-action@v2
with: with:
arguments: build test publish arguments: build test publish
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: Publish Test Report - name: 'Publish Test Report 📊'
uses: mikepenz/action-junit-report@v3 uses: mikepenz/action-junit-report@v3
if: success() || failure() # always run even if the previous step fails if: success() || failure() # always run even if the previous step fails
with: with:
report_paths: '**/build/test-results/test/TEST-*.xml' report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Query Version - name: 'Fetch Version Name 📝'
run: | run: |
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
- name: Upload to Modrinth & Hangar (Spigot) - name: 'Spigot: Publish to Modrinth & Hangar 🚰'
uses: WiIIiam278/mc-publish@hangar uses: WiIIiam278/mc-publish@hangar
with: with:
modrinth-id: J6U9o3JG modrinth-id: J6U9o3JG
@@ -72,7 +73,7 @@ jobs:
1.19.4 1.19.4
1.20.1 1.20.1
java: 16 java: 16
- name: Upload to Modrinth (Sponge) - name: 'Sponge: Publish to Modrinth 🧽'
uses: WiIIiam278/mc-publish@hangar uses: WiIIiam278/mc-publish@hangar
with: with:
modrinth-id: J6U9o3JG modrinth-id: J6U9o3JG
@@ -80,7 +81,7 @@ jobs:
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-dependencies: | modrinth-dependencies: |
bluemap | suggests | * bluemap | suggests | *
plan | suggests | * plan-player-analytics | suggests | *
files-primary: target/HuskHomes-Sponge-*.jar files-primary: target/HuskHomes-Sponge-*.jar
name: HuskHomes (Sponge) v${{ env.version_name }} name: HuskHomes (Sponge) v${{ env.version_name }}
version: ${{ env.version_name }} version: ${{ env.version_name }}
@@ -91,7 +92,7 @@ jobs:
game-versions: | game-versions: |
1.16.5 1.16.5
java: 16 java: 16
- name: Upload to Modrinth & CurseForge (Fabric) - name: 'Fabric: Publish to Modrinth & CurseForge 🧵'
uses: WiIIiam278/mc-publish@hangar uses: WiIIiam278/mc-publish@hangar
with: with:
modrinth-id: J6U9o3JG modrinth-id: J6U9o3JG
@@ -107,13 +108,14 @@ jobs:
luckperms | suggests | * luckperms | suggests | *
plan-player-analytics | suggests | * plan-player-analytics | suggests | *
files-primary: target/HuskHomes-Fabric-1.20.1-*.jar files-primary: target/HuskHomes-Fabric-1.20.1-*.jar
files-secondary: | files-secondary: target/HuskHomes-Fabric-!(1.20.1)-*.jar
target/HuskHomes-Fabric-1.19.4-*.jar
target/HuskHomes-Fabric-1.19.2-*.jar
name: HuskHomes (Fabric) v${{ env.version_name }} name: HuskHomes (Fabric) v${{ env.version_name }}
version: ${{ env.version_name }} version: ${{ env.version_name }}
version-type: alpha version-type: alpha
changelog: ${{ github.event.head_commit.message }} changelog: |
> ⚠ Remember to download the correct JAR file for your version of Minecraft!
${{ github.event.release.body }}
loaders: | loaders: |
fabric fabric
game-versions: | game-versions: |
@@ -121,18 +123,11 @@ jobs:
1.19.4 1.19.4
1.20.1 1.20.1
java: 17 java: 17
- name: Upload GitHub Artifact (Spigot) - name: 'Upload GitHub Artifacts 📦'
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: HuskHomes (Spigot) name: HuskHomes
path: target/HuskHomes-Plugin-*.jar path: |
- name: Upload GitHub Artifact (Sponge) target/HuskHomes-Plugin-*.jar
uses: actions/upload-artifact@v2 target/HuskHomes-Sponge-*.jar
with: target/HuskHomes-Fabric-*.jar
name: HuskHomes (Sponge)
path: target/HuskHomes-Sponge-*.jar
- name: Upload GitHub Artifact (Fabric)
uses: actions/upload-artifact@v2
with:
name: HuskHomes (Fabric)
path: target/HuskHomes-Fabric-*.jar
+19 -24
View File
@@ -13,25 +13,26 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - name: 'Checkout for CI 🛎️'
- name: Set up JDK 17 uses: actions/checkout@v3
- name: 'Set up JDK 17 📦'
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
java-version: '17' java-version: '17'
distribution: 'temurin' distribution: 'temurin'
- name: Build with Gradle - name: 'Build with Gradle 🏗️'
uses: gradle/gradle-build-action@v2 uses: gradle/gradle-build-action@v2
with: with:
arguments: build test publish arguments: build test publish
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: Publish Test Report - name: 'Publish Test Report 📊'
uses: mikepenz/action-junit-report@v3 uses: mikepenz/action-junit-report@v3
if: success() || failure() # always run even if the previous step fails if: success() || failure() # always run even if the previous step fails
with: with:
report_paths: '**/build/test-results/test/TEST-*.xml' report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Upload to Modrinth & Hangar (Spigot) - name: 'Spigot: Publish to Modrinth & Hangar 🚰'
uses: WiIIiam278/mc-publish@hangar uses: WiIIiam278/mc-publish@hangar
with: with:
modrinth-id: J6U9o3JG modrinth-id: J6U9o3JG
@@ -60,7 +61,7 @@ jobs:
1.19.4 1.19.4
1.20.1 1.20.1
java: 16 java: 16
- name: Upload to Modrinth (Sponge) - name: 'Sponge: Publish to Modrinth 🧽'
uses: WiIIiam278/mc-publish@hangar uses: WiIIiam278/mc-publish@hangar
with: with:
modrinth-id: J6U9o3JG modrinth-id: J6U9o3JG
@@ -79,7 +80,7 @@ jobs:
game-versions: | game-versions: |
1.16.5 1.16.5
java: 16 java: 16
- name: Upload to Modrinth & CurseForge (Fabric) - name: 'Fabric: Publish to Modrinth & CurseForge 🧵'
uses: WiIIiam278/mc-publish@hangar uses: WiIIiam278/mc-publish@hangar
with: with:
modrinth-id: J6U9o3JG modrinth-id: J6U9o3JG
@@ -95,13 +96,14 @@ jobs:
luckperms | suggests | * luckperms | suggests | *
plan-player-analytics | suggests | * plan-player-analytics | suggests | *
files-primary: target/HuskHomes-Fabric-1.20.1-*.jar files-primary: target/HuskHomes-Fabric-1.20.1-*.jar
files-secondary: | files-secondary: target/HuskHomes-Fabric-!(1.20.1)-*.jar
target/HuskHomes-Fabric-1.19.4-*.jar
target/HuskHomes-Fabric-1.19.2-*.jar
name: HuskHomes (Fabric) v${{ github.event.release.tag_name }} name: HuskHomes (Fabric) v${{ github.event.release.tag_name }}
version: ${{ github.event.release.tag_name }} version: ${{ github.event.release.tag_name }}
version-type: release version-type: release
changelog: ${{ github.event.release.body }} changelog: |
> ⚠ Remember to download the correct JAR file for your version of Minecraft!
${{ github.event.release.body }}
loaders: | loaders: |
fabric fabric
game-versions: | game-versions: |
@@ -109,18 +111,11 @@ jobs:
1.19.4 1.19.4
1.20.1 1.20.1
java: 17 java: 17
- name: Upload GitHub Artifact (Spigot) - name: 'Upload GitHub Artifacts 📦'
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: HuskHomes (Spigot) name: HuskHomes
path: target/HuskHomes-Plugin-*.jar path: |
- name: Upload GitHub Artifact (Sponge) target/HuskHomes-Plugin-*.jar
uses: actions/upload-artifact@v2 target/HuskHomes-Sponge-*.jar
with: target/HuskHomes-Fabric-*.jar
name: HuskHomes (Sponge)
path: target/HuskHomes-Sponge-*.jar
- name: Upload GitHub Artifact (Fabric)
uses: actions/upload-artifact@v2
with:
name: HuskHomes (Fabric)
path: target/HuskHomes-Fabric-*.jar
+1 -1
View File
@@ -20,5 +20,5 @@ include(
'fabric:fabric-1.20.1', 'fabric:fabric-1.20.1',
// Sponge // Sponge
'sponge:sponge-api8' 'sponge'
) )
File renamed without changes.