Skip to content

Commit

Permalink
Update deployment strategy
Browse files Browse the repository at this point in the history
NickImpact committed Mar 9, 2021
1 parent 743f3a9 commit dcfd9b4
Showing 2 changed files with 46 additions and 15 deletions.
56 changes: 44 additions & 12 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
@@ -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
DISCORD_WEBHOOK_ID_GENERATIONS: ${{ secrets.DISCORD_WEBHOOK_ID_GENERATIONS }}
DISCORD_WEBHOOK_TOKEN_GENERATIONS: ${{ secrets.DISCORD_WEBHOOK_TOKEN_GENERATIONS }}
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit dcfd9b4

Please sign in to comment.