Skip to content

fix: Use Java 17 on github actions #2

fix: Use Java 17 on github actions

fix: Use Java 17 on github actions #2

Workflow file for this run

name: Publish mod
on:
push:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up JDK 17
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0
with:
java-version: '17'
distribution: 'temurin'
- uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
- run: ./gradlew build modrinth
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
- run: ./gradlew build publish
env:
MAVEN_REPO: ${{ secrets.MAVEN_REPO }}
MAVEN_AUTH_HEADER: ${{ secrets.MAVEN_AUTH_HEADER }}
MAVEN_AUTH_TOKEN: ${{ secrets.MAVEN_AUTH_TOKEN }}