Skip to content

Release

Release #15

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
nextVersion:
type: string
required: true
description: 'The next version in development'
jobs:
build:
runs-on: ubuntu-latest
env:
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
RELEASE: true
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Java
run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> "$GITHUB_ENV"
- name: Loom Cache
uses: actions/cache@v4
with:
path: "**/.gradle/loom-cache"
key: "${{ runner.os }}-gradle-${{ hashFiles('**/libs.versions.*', '**/*.gradle*', '**/gradle-wrapper.properties') }}"
restore-keys: "${{ runner.os }}-gradle-"
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
- name: Validate Gradle Wrapper Integrity
uses: gradle/wrapper-validation-action@v2
- name: Publish
# build task creates artifacts for capture and upload, then publish publishes to maven
run: ./gradlew build publish
- name: Capture Build Artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/
- name: Publish to Modrinth and Curseforge
uses: Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: tEJPA4Ty
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-id: 696251
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
modrinth-featured: false # leave it to auto featuring
changelog-file: CHANGELOG.txt
loaders: |
fabric
quilt
dependencies: |
fabric-api(required){modrinth:P7dR8mSH}{curseforge:306612}
- name: Prepare for next Release
run: './gradlew postRelease -PnextVersion="${{ inputs.nextVersion }}"'
- name: Push updated Version and Changelog
run: |
git config --global user.name github-actions-bot
git config --global user.email github-actions[bot]@users.noreply.github.com
git add CHANGELOG.txt
git add gradle.properties
git commit -m "Reset changelog and bump version"
git push