ACTION_RELEASE 1.20.2 #54
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
# REMINDER TO CHANGE VERSION RESOLVER, For now manually specifying work | |
# Change this to an automatic resolver in the future | |
name: Upload Artifacts and Optionally Publish on Curseforge & Modrinth | |
on: [ push ] | |
env: | |
# MINECRAFT_VERSION: 1.20.0 | |
JAVA_VERSION: 17 | |
VERSION: fabric-1.20.2+1.7.2 | |
RELEASE_NAME: SomeOrdinaryTweaks-1.20.2+1.7.1 | |
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | |
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Environment Variables | |
run: env | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup Java | |
uses: actions/setup-java@v2 | |
with: | |
distribution: "temurin" | |
java-version: 17 | |
- name: Make Gradle Wrapper Executable | |
if: ${{ runner.os != 'Windows' }} | |
run: chmod +x ./gradlew | |
- name: Build | |
run: ./gradlew clean build | |
- name: capture build artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Artifacts | |
path: build/libs/ | |
- name: Publish (CurseForge/Modrinth/Github) | |
if: "contains(github.event.head_commit.message, 'ACTION_RELEASE')" | |
uses: Kir-Antipov/[email protected] | |
with: | |
curseforge-id: 550257 | |
curseforge-token: "${{env.CURSEFORGE_TOKEN}}" | |
modrinth-id: LNeXYJOg | |
modrinth-token: "${{env.MODRINTH_TOKEN}}" | |
name: "${{env.RELEASE_NAME}}" | |
version: "${{env.VERSION}}" | |
version-type: alpha | |
changelog-file: CHANGELOG.md | |
loaders: | | |
fabric | |
quilt | |
game-versions: "${{env.MINECRAFT_VERSION}}" | |
java: "${{env.JAVA_VERSION}}" | |