Skip to content

update changelog

update changelog #149

Workflow file for this run

name: release
on:
workflow_dispatch:
push:
branches:
- 'dev/master'
paths:
- 'CHANGELOG.txt'
permissions:
contents: write
packages: write
jobs:
get-release-targets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: script
run: kotlin .github/workflows/scripts/get-release-targets.main.kts
env:
GITHUB_TOKEN: ${{ github.token }}
outputs:
empty: ${{ steps.script.outputs.empty }}
branches: ${{ steps.script.outputs.branches }}
changelogs: ${{ steps.script.outputs.changelogs }}
release:
needs: get-release-targets
if: ${{ needs.get-release-targets.outputs.empty == 'false' }}
strategy:
max-parallel: 1
matrix:
branch: ${{ fromJSON(needs.get-release-targets.outputs.branches) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: parse
run: kotlin .github/workflows/scripts/parse-changelog.main.kts
env:
BRANCH: ${{ matrix.branch }}
CHANGELOGS: ${{ needs.get-release-targets.outputs.changelogs }}
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
- uses: actions/setup-java@v4
with:
java-version: ${{ steps.parse.outputs.java }}
distribution: temurin
- uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: true
- run: ./gradlew build publishMods publish
env:
MOD_VERSION: ${{ steps.parse.outputs.version }}
GITHUB_TOKEN: ${{ github.token }}
CURSEFORGE_API: ${{ secrets.CURSEFORGE_API }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
CHANGELOG: |
${{ fromJSON(steps.parse.outputs.changelog) }}
- uses: softprops/action-gh-release@v2
with:
name: "[${{ steps.parse.outputs.minecraft }}] ${{ steps.parse.outputs.version }}"
tag_name: ${{ steps.parse.outputs.version }}
target_commitish: ${{ matrix.branch }}
prerelease: ${{ fromJSON(steps.parse.outputs.prerelease) }}
body: |
${{ fromJSON(steps.parse.outputs.changelog) }}
files: |
./platform/*/build/libs/*[0-9.].jar
./platform/*/build/libs/*[0-9.]-api.jar
./fabric/build/libs/wthit-**-fabric.jar
./forge/build/libs/wthit-**-forge.jar