try release webhook

This commit is contained in:
alexcrea 2026-01-12 03:01:41 +01:00
parent 2f2e6f9af4
commit 74a4f453b2
Signed by: alexcrea
GPG key ID: E346CD16413450E3

View file

@ -66,6 +66,12 @@ jobs:
if: ${{ github.event_name != 'release' && success() }} if: ${{ github.event_name != 'release' && success() }}
run: echo "SMALL_COMMIT_HASH=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV run: echo "SMALL_COMMIT_HASH=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV
- name: Prepare release env variable
if: ${{ github.event_name != 'release' && success() }}
run: |
echo "RELEASE_CHANGELOG=${{ github.event.release.body }}" >> $GITHUB_ENV
echo "IS_GITHUB_PRERELEASE=${{ github.event.release.prerelease }}" >> $GITHUB_ENV
- name: Build with Gradle Wrapper - name: Build with Gradle Wrapper
run: ./gradlew build --parallel --stacktrace run: ./gradlew build --parallel --stacktrace
@ -115,13 +121,11 @@ jobs:
- name: Hangar release - name: Hangar release
if: ${{ (github.event_name == 'release' || github.event_name == 'push') && github.repository_owner == 'alexcrea' && success() }} if: ${{ (github.event_name == 'release' || github.event_name == 'push') && github.repository_owner == 'alexcrea' && success() }}
env: env:
RELEASE_CHANGELOG: ${{ github.event.release.body }}
IS_GITHUB_PRERELEASE: ${{ github.event.release.prerelease }}
HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }} HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }}
run: ./gradlew publishAllPublicationsToHangar --stacktrace run: ./gradlew publishAllPublicationsToHangar --stacktrace
- name: Modrinth publish alpha - name: Modrinth publish alpha
if: ${{ github.event_name == 'push' && github.repository_owner == 'alexcrea' && success() }} if: ${{ github.event_name == 'push' && github.repository_owner == 'alexcrea' && success() && false}}
uses: cloudnode-pro/modrinth-publish@v2 uses: cloudnode-pro/modrinth-publish@v2
with: with:
token: ${{ secrets.MODRINTH_TOKEN }} token: ${{ secrets.MODRINTH_TOKEN }}
@ -133,7 +137,7 @@ jobs:
files: build/libs/${{ env.ONLINE_JAR_NAME }} files: build/libs/${{ env.ONLINE_JAR_NAME }}
- name: Modrinth publish release - name: Modrinth publish release
if: ${{ github.event_name == 'release' && github.repository_owner == 'alexcrea' && success() }} if: ${{ github.event_name == 'release' && github.repository_owner == 'alexcrea' && success() && false}}
uses: cloudnode-pro/modrinth-publish@v2 uses: cloudnode-pro/modrinth-publish@v2
with: with:
token: ${{ secrets.MODRINTH_TOKEN }} token: ${{ secrets.MODRINTH_TOKEN }}
@ -142,3 +146,14 @@ jobs:
loaders: '["spigot", "paper", "purpur", "folia"]' loaders: '["spigot", "paper", "purpur", "folia"]'
game-versions: '["1.18.x", "1.19.x", "1.20.x", "1.21.x"]' game-versions: '["1.18.x", "1.19.x", "1.20.x", "1.21.x"]'
files: build/libs/${{ env.ONLINE_JAR_NAME }} files: build/libs/${{ env.ONLINE_JAR_NAME }}
- name: Release
uses: tsickert/discord-webhook@v7.0.0
with:
webhook-url: ${{ secrets.RELEASE_WEBHOOK_URL }}
content: |
<@&1338546156325568642>
# New version of custom anvil ! <:CustomAnvil:1262550667986342001>([modrinth](https://modrinth.com/plugin/customanvil) and [hangar](https://hangar.papermc.io/alexcrea/CustomAnvil) links)
-# (note: automated release. spigot and modrinth will be uploaded soon)
${{ env.RELEASE_CHANGELOG }}