aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
diff options
context:
space:
mode:
authorPetr Ilin <hevav@hevav.dev>2023-01-23 15:51:20 +0300
committerPetr Ilin <hevav@hevav.dev>2023-01-23 15:51:20 +0300
commitd5f320ecfb14416aa86b38b03e417ed972cef276 (patch)
treefdfe33d2923b80876977723ffd00e90d1ae8806e /.github/workflows/release.yml
parent0fc01edf83f47ba9e19b9ea44ab2232cab4fe4a1 (diff)
downloadLimboAuth-d5f320ecfb14416aa86b38b03e417ed972cef276.tar.gz
LimboAuth-d5f320ecfb14416aa86b38b03e417ed972cef276.tar.bz2
LimboAuth-d5f320ecfb14416aa86b38b03e417ed972cef276.zip
New build workflow
Diffstat (limited to '.github/workflows/release.yml')
-rw-r--r--.github/workflows/release.yml52
1 files changed, 52 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..52481c5
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,52 @@
+name: Java CI with Gradle
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3.0.0
+ - name: Set up JDK
+ uses: actions/setup-java@v3.0.0
+ with:
+ distribution: adopt
+ java-version: 11
+ - name: Build LimboAuth
+ run: ./gradlew build
+ - name: Upload LimboAuth
+ uses: actions/upload-artifact@v3.0.0
+ with:
+ name: LimboAuth
+ path: "build/libs/limboauth*.jar"
+ - name: Find correct JAR
+ id: find-jar
+ run: |
+ output="$(find build/libs/ ! -name "*-javadoc.jar" ! -name "*-sources.jar" -type f -printf "%f\n")"
+ echo "::set-output name=jarname::$output"
+ - name: Upload to the GitHub release
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ github.event.release.upload_url }}
+ asset_path: build/libs/${{ steps.find-jar.outputs.jarname }}
+ asset_name: ${{ steps.find-jar.outputs.jarname }}
+ asset_content_type: application/java-archive
+ - name: Upload to Modrinth
+ uses: RubixDev/modrinth-upload@v1.0.0
+ with:
+ token: ${{ secrets.MODRINTH_TOKEN }}
+ file_path: build/libs/${{ steps.find-jar.outputs.jarname }}
+ name: Release ${{ github.event.release.tag_name }}
+ version: ${{ github.event.release.tag_name }}
+ changelog: ${{ github.event.release.body }}
+ relations: TZOteSf2:required
+ game_versions: 1.7.2
+ release_type: release
+ loaders: velocity
+ featured: true
+ project_id: 4iChqdl8