Skip to content

Update CHANGELOG.txt #93

Update CHANGELOG.txt

Update CHANGELOG.txt #93

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@v3
- 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@v3
- 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@v3
with:
ref: ${{ matrix.branch }}
- uses: actions/setup-java@v3
with:
java-version: ${{ steps.parse.outputs.java }}
distribution: temurin
- uses: gradle/gradle-build-action@v2
with:
cache-read-only: true
- run: ./gradlew build curseforge modrinth publish --max-workers=1
env:
MOD_VERSION: ${{ steps.parse.outputs.version }}
GITHUB_TOKEN: ${{ github.token }}
CURSEFORGE_API: ${{ secrets.CURSEFORGE_API }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CHANGELOG: |
${{ fromJSON(steps.parse.outputs.changelog) }}
- uses: sylwit/install-b2-cli-action@ae80099fa373ec5aef6fa509aa3012fcdd936b6d
env:
B2_APPLICATION_KEY_ID: ${{ secrets.B2_APPLICATION_KEY_ID }}
B2_APPLICATION_KEY: ${{ secrets.B2_APPLICATION_KEY }}
- run: |
b2 sync --replaceNewer .b2 b2://maven-bai-lol
b2 clear-account
- uses: softprops/action-gh-release@v1
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