diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index d11a2d7..b48f77c 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -66,6 +66,12 @@ jobs: if: ${{ github.event_name != 'release' && success() }} 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 run: ./gradlew build --parallel --stacktrace @@ -115,13 +121,11 @@ jobs: - name: Hangar release if: ${{ (github.event_name == 'release' || github.event_name == 'push') && github.repository_owner == 'alexcrea' && success() }} env: - RELEASE_CHANGELOG: ${{ github.event.release.body }} - IS_GITHUB_PRERELEASE: ${{ github.event.release.prerelease }} HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }} run: ./gradlew publishAllPublicationsToHangar --stacktrace - 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 with: token: ${{ secrets.MODRINTH_TOKEN }} @@ -133,7 +137,7 @@ jobs: files: build/libs/${{ env.ONLINE_JAR_NAME }} - 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 with: token: ${{ secrets.MODRINTH_TOKEN }} @@ -142,3 +146,14 @@ jobs: loaders: '["spigot", "paper", "purpur", "folia"]' game-versions: '["1.18.x", "1.19.x", "1.20.x", "1.21.x"]' 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 }} \ No newline at end of file