[Release] Remove old version tag from Curse publish #11
This file contains hidden or 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: Release for 5.x | |
on: | |
push: | |
branches: [ '5.x' ] | |
workflow_dispatch: | |
jobs: | |
release: | |
name: Publish release JAR for Kotlin for Forge | |
runs-on: ubuntu-latest | |
if: "contains(github.event.head_commit.message, '[Release]') || github.event_name == 'workflow_dispatch'" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Validate Gradle wrapper | |
uses: gradle/actions/wrapper-validation@v3 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'microsoft' | |
java-version: '21' | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Upload to CurseForge | |
run: ./gradlew publishCurseforge | |
env: | |
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} | |
- name: Upload to Modrinth | |
run: ./gradlew publishModrinth | |
env: | |
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} |