From 42dd089a4af357565d885c409777ffd84be5e092 Mon Sep 17 00:00:00 2001 From: Wohlhabend Date: Sat, 16 Oct 2021 23:59:59 +0200 Subject: Update to 1.2.2 + automatic write changelog in discord channel --- .github/workflows/buildrelease.yml | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) (limited to '.github') diff --git a/.github/workflows/buildrelease.yml b/.github/workflows/buildrelease.yml index 546a6174..47ecb126 100644 --- a/.github/workflows/buildrelease.yml +++ b/.github/workflows/buildrelease.yml @@ -52,14 +52,40 @@ jobs: script: | const fs = require("fs") return fs.readdirSync("build/libs/").filter(e => !e.endsWith("dev.jar") && !e.endsWith("sources.jar") && e.endsWith(".jar"))[0] - - - uses: softprops/action-gh-release@v1 + - name: Release + id: uploadrelease + uses: softprops/action-gh-release@v1 with: body: ${{ steps.read_changelog.outputs.changelog }} files: build/libs/${{ steps.fname.outputs.result }} - name: Publish to Modrinth + id: modrinth env: - MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} CHANGELOG: ${{ steps.read_changelog.outputs.changelog }} - run: ./gradlew publishModrinth \ No newline at end of file + run: ./gradlew publishModrinth + + - name: Get version tag + id: version_tag + run: | + [[ ! "$GITHUB_REF" =~ refs/tags ]] && exit + echo "::set-output name=value::${GITHUB_REF#refs/tags/}" + + - name: Discord notification + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + uses: Ilshidur/action-discord@master + with: + args: | + "@here" + "Skyblocker ${{ steps.version_tag.outputs.value }}" + "" + "Changelog" + "```md" + "${{ steps.read_changelog.outputs.changelog }}" + "```" + "<${{ steps.uploadrelease.outputs.url }}>" + "<${{ steps.modrinth.outputs.url }}>" + "" + "" \ No newline at end of file -- cgit