Add leaderboard #8
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: Publish | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- master | |
workflow_dispatch: | |
env: | |
MINECRAFT_VERSION: 1.20.1 | |
JAVA_VERSION: 17 | |
VERSION: 2.0.1+1.20.1 | |
VERSION_TYPE: alpha | |
permissions: | |
contents: write | |
jobs: | |
build: | |
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' # ty process-analytics/github-actions-playground | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Environment Variables | |
run: env | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup Java | |
uses: actions/setup-java@v3.12.0 | |
with: | |
distribution: "temurin" | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: Make Gradle Wrapper Executable | |
if: ${{ runner.os != 'Windows' }} | |
run: chmod +x ./gradlew | |
- name: Build | |
run: ./gradlew clean build | |
- name: Publish | |
uses: Kir-Antipov/mc-publish@v3.3 | |
with: | |
version-type: ${{ env.VERSION_TYPE }} | |
modrinth-id: 1V7z9dq4 | |
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | |
github-tag: "v${{ env.VERSION }}" | |
github-token: ${{ secrets.GH_TOKEN }} | |
changelog-file: CHANGELOG.md | |
game-versions: "${{ env.MINECRAFT_VERSION }}" | |
java: "${{ env.JAVA_VERSION }}" |