multi-line text #287
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI with Gradle | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }} | |
MODRINTH_API_TOKEN: ${{ secrets.MODRINTH_API_TOKEN }} | |
BUILD_NUMBER: ${{ github.run_number }} | |
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build all file. | |
run: ./gradlew build --stacktrace | |
- name: Publish to Modrinth | |
run: ./gradlew modrinthPublish --stacktrace | |
- name: Publish to Hangar | |
run: ./gradlew publishPluginPublicationToHangar --stacktrace |