1
0
mirror of https://github.com/GeyserMC/PackConverter.git synced 2025-12-19 14:59:21 +00:00

setup publishing, attempt number eins

This commit is contained in:
onebeastchris
2025-08-13 01:15:57 +03:00
parent d4216fcf23
commit 46753489d3

View File

@@ -17,45 +17,74 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository and submodules - name: Get Release Info
# See https://github.com/actions/checkout/commits id: release-info
uses: actions/checkout@72f2cec99f417b1a1c5e2e88945068983b7965f9 uses: GeyserMC/actions/previous-release@master
with: with:
submodules: recursive data: ${{ vars.RELEASEACTION_PREVRELEASE }}
- name: Validate Gradle Wrapper - name: Setup Gradle
# See https://github.com/gradle/wrapper-validation-action/commits uses: GeyserMC/actions/setup-gradle-composite@master
uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4
# See https://github.com/actions/setup-java/commits
- uses: actions/setup-java@4075bfc1b51bf22876335ae1cd589602d60d8758
with: with:
java-version: 17 setup-java_java-version: 21
distribution: temurin
- name: Build - name: Build Thunder
# See https://github.com/gradle/gradle-build-action/commits run: ./gradlew build
uses: gradle/gradle-build-action@3bfe3a46584a206fb8361cdedd0647b0c4204232 env:
with: BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }}
arguments: build
gradle-home-cache-cleanup: true
- name: Archive artifacts (Boostrap) - name: Archive Artifacts
# See https://github.com/actions/upload-artifact/commits uses: GeyserMC/actions/upload-multi-artifact@master
uses: actions/upload-artifact@6027e3dd177782cd8ab9af838c04fd81a07f1d47
if: success() if: success()
with: with:
name: PackConverter CLI artifacts: |
path: | bootstrap/build/libs/Thunder.jar
bootstrap/build/libs/*.jar
!bootstrap/build/libs/bootstrap-*.jar
if-no-files-found: error
- name: Publish to Maven Repository - name: Publish to Maven Repository
if: ${{ success() && github.repository == 'GeyserMC/PackConverter' && github.ref_name == 'master' }} if: ${{ success() && github.repository == 'GeyserMC/PackConverter' && github.ref_name == 'master' }}
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 run: ./gradlew publish
env: env:
OPENCOLLAB_USERNAME: ${{ vars.DEPLOY_USER }} BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }}
OPENCOLLAB_PASSWORD: ${{ secrets.DEPLOY_PASS }} ORG_GRADLE_PROJECT_geysermcUsername: ${{ vars.DEPLOY_USER }}
ORG_GRADLE_PROJECT_geysermcPassword: ${{ secrets.DEPLOY_PASS }}
- name: Get Version
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/PackConverter' }}
id: get-version
run: |
version=$(grep -o "mod_version=[0-9\\.]*" gradle.properties | cut -d"=" -f2 | cut -d"-" -f1)
echo "VERSION=${version}" >> $GITHUB_OUTPUT
- name: Get Release Metadata
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/PackConverter' }}
uses: GeyserMC/actions/release@master
id: metadata
with: with:
arguments: publish appID: ${{ secrets.RELEASE_APP_ID }}
appPrivateKey: ${{ secrets.RELEASE_APP_PK }}
files: |
thunder:bootstrap/build/libs/Thunder.jar
releaseEnabled: false
saveMetadata: true
releaseProject: 'thunder'
releaseVersion: ${{ steps.get-version.outputs.VERSION }}
- name: Publish to Downloads API
if: ${{ success() && github.repository == 'GeyserMC/PackConverter' && github.ref_name == 'master' }}
uses: GeyserMC/actions/upload-release@master
with:
username: ${{ vars.DOWNLOADS_USERNAME }}
privateKey: ${{ secrets.DOWNLOADS_PRIVATE_KEY }}
host: ${{ secrets.DOWNLOADS_SERVER_IP }}
files: |
bootstrap/build/libs/Thunder.jar
changelog: ${{ steps.metadata.outputs.body }}
- name: Notify Discord
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/PackConverter' }}
uses: GeyserMC/actions/notify-discord@master
with:
discordWebhook: ${{ secrets.DISCORD_WEBHOOK }}
status: ${{ job.status }}
body: ${{ steps.metadata.outputs.body }}
includeDownloads: true