From dcfd9b4a1c85e9fa6c1f809a5bfedc006529c908 Mon Sep 17 00:00:00 2001 From: Nick DeGruccio Date: Mon, 8 Mar 2021 22:16:27 -0700 Subject: [PATCH] Update deployment strategy --- .github/workflows/create_release.yml | 56 ++++++++++++++++++++++------ build.gradle | 5 +-- 2 files changed, 46 insertions(+), 15 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 1af3568e..4a024313 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -48,29 +48,61 @@ jobs: draft: false prerelease: false - name: Upload Sponge Jar to Github + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ github.workspace }}/build/allJars/GTS-Sponge-${{ steps.get_version.outputs.version }}.jar + asset_name: GTS-Sponge-${{ steps.get_version.outputs.version }}.jar + asset_content_type: application/java-archive + - name: Upload Bungee Jar uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ github.workspace }}/build/allJars/GTS-Sponge-${{ steps.get_version.outputs.version }}.jar - asset_name: GTS-Sponge-${{ steps.get_version.outputs.version }}.jar + asset_path: ${{ github.workspace }}/build/allJars/GTS-Bungee-${{ steps.get_version.outputs.version }}.jar + asset_name: GTS-Bungee-${{ steps.get_version.outputs.version }}.jar + asset_content_type: application/java-archive + - name: Upload Velocity Jar + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ github.workspace }}/build/allJars/GTS-Velocity-${{ steps.get_version.outputs.version }}.jar + asset_name: GTS-Velocity-${{ steps.get_version.outputs.version }}.jar + asset_content_type: application/java-archive + - name: Upload Reforged Extension Jar + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ github.workspace }}/build/allJars/GTS-Extension-Reforged-${{ steps.get_version.outputs.version }}.jar + asset_name: GTS-Extension-Reforged-${{ steps.get_version.outputs.version }}.jar + asset_content_type: application/java-archive + - name: Upload Generations Extension Jar + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ github.workspace }}/build/allJars/GTS-Extension-Generations-${{ steps.get_version.outputs.version }}.jar + asset_name: GTS-Extension-Generations-${{ steps.get_version.outputs.version }}.jar asset_content_type: application/java-archive - name: Upload Sponge Jar to Ore - run: ./gradlew deploy + run: ./gradlew publishToOre env: ORE_API_KEY: ${{ secrets.ORE_API_KEY }} + - name: Upload All to Discord + run: ./gradlew publishToDiscord + env: DISCORD_WEBHOOK_MEMBER_ROLE: ${{ secrets.DISCORD_WEBHOOK_MEMBER_ROLE }} DISCORD_WEBHOOK_ID_PLUGIN: ${{ secrets.DISCORD_WEBHOOK_ID_PLUGIN }} DISCORD_WEBHOOK_TOKEN_PLUGIN: ${{ secrets.DISCORD_WEBHOOK_TOKEN_PLUGIN }} DISCORD_WEBHOOK_ID_REFORGED: ${{ secrets.DISCORD_WEBHOOK_ID_REFORGED }} DISCORD_WEBHOOK_TOKEN_REFORGED: ${{ secrets.DISCORD_WEBHOOK_TOKEN_REFORGED }} - - name: Upload Bungee Jar - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ github.workspace }}/build/allJars/GTS-Bungee-${{ steps.get_version.outputs.version }}.jar - asset_name: GTS-Bungee-${{ steps.get_version.outputs.version }}.jar - asset_content_type: application/java-archive \ No newline at end of file + DISCORD_WEBHOOK_ID_GENERATIONS: ${{ secrets.DISCORD_WEBHOOK_ID_GENERATIONS }} + DISCORD_WEBHOOK_TOKEN_GENERATIONS: ${{ secrets.DISCORD_WEBHOOK_TOKEN_GENERATIONS }} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 1dfcda32..71f8225f 100644 --- a/build.gradle +++ b/build.gradle @@ -194,7 +194,7 @@ task copyJars(type: Copy) { exclude 'velocity*.jar' } -task uploadToOre(type: UploadToOre) { +task publishToOre(type: UploadToOre) { dependsOn(genChangelog) dependsOn(copyJars) @@ -255,8 +255,7 @@ task sendToDiscordGenerationsExtension(type: PostToDiscord) { force = true } -task deploy { - dependsOn(uploadToOre) +task publishToDiscord { dependsOn(sendToDiscordPlugins) dependsOn(sendToDiscordReforgedExtension) dependsOn(sendToDiscordGenerationsExtension)