Skip to content

Java CI with Gradle #14

Java CI with Gradle

Java CI with Gradle #14

Workflow file for this run

name: Java CI with Gradle
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up JDK
uses: actions/[email protected]
with:
distribution: adopt
java-version: 11
- name: Build LimboFilter
run: ./gradlew build
- name: Upload LimboFilter
uses: actions/[email protected]
with:
name: LimboFilter
path: "build/libs/limbofilter*.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/[email protected]
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: 6zIy0zBK