Skip to content

docs(changelog): v2.7.1 #56

docs(changelog): v2.7.1

docs(changelog): v2.7.1 #56

Workflow file for this run

name: Publish
on:
push:
tags: [ "v*" ]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
cache: gradle
- name: Parse changelog
run: |
content="$(awk -v version="$GITHUB_REF_NAME" '/^## /{ if (p) { exit }; if ($2 == version) { p = 1; next } } p' CHANGELOG.md | tail -n+2)"
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
echo "$content" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- run: ./gradlew chiseledPublish
env:
CHANGELOG: ${{ env.CHANGELOG }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
- uses: softprops/action-gh-release@v2
with:
body: ${{ env.CHANGELOG }}
files: build/libs/*.jar