Skip to content

publish

publish #5

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
name: publish
on:
workflow_dispatch:
release:
types: [created]
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Build with Gradle
id: build
run: chmod +x gradlew && ./gradlew build
- name: Find correct JAR
id: findjar
run: |
output="$(find build/libs/ ! -name "*-dev.jar" ! -name "*-sources.jar" -type f -printf "%f\n")"
echo "jarname=$output" >> $GITHUB_OUTPUT
- name: Upload to Modrinth
uses: RubixDev/modrinth-upload@v1
with:
token: ${{ secrets.MODRINTH_TOKEN }}
file_path: build/libs/${{ steps.findjar.outputs.jarname }}
name: Controlify Wynn v${{ github.event.release.tag_name }}
version: ${{ github.event.release.tag_name }}
changelog: ${{ github.event.release.body }}
relations: DOUdJVEm:required,dU5Gb9Ab:required,P7dR8mSH:required
game_versions: 1.20.2
release_type: beta
loaders: fabric
featured: false
project_id: 30a9CaQe