ver: 1.4.1 #2
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: Publish on CurseForge and Modrinth | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
"*" | |
env: | |
MC_MIN_VER: '1.21' | |
MC_MAX_VER: '1.21.1' | |
JAVA_VERSION: 21 | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 20 | |
- name: Fetch tags (actions/checkout#1467) | |
run: | | |
git fetch --tags --force | |
- name: Get version from tag | |
run: | | |
echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
distribution: "temurin" | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Generate changelog | |
run: | | |
printf "Auto-generated Changelog:\n%s" "$(git log "$(git describe --tags --abbrev=0 HEAD~1)..HEAD~1" --oneline | awk '! / (ci|ver|internal|README)!?([:,. ]|$)/ { $1="-"; print $0 }')" > .ci-changelog.md | |
- uses: Kir-Antipov/[email protected] | |
with: | |
modrinth-id: gL8ijqNQ | |
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | |
curseforge-id: 1061812 | |
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | |
name: Ars Controle ${{ env.VERSION }} for ${{ env.MC_MAX_VER }} | |
version: ${{ env.VERSION }} | |
game-versions: | | |
>=${{ env.MC_MIN_VER }} <=${{ env.MC_MAX_VER }} | |
changelog-file: .ci-changelog.md |