1.20.6-1.1.2 [RELEASE] #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish Release | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
outputs: | |
java-version: ${{ steps.properties.outputs.java_version }} | |
mc-version: ${{ steps.properties.outputs.minecraft_version }} | |
mod-version: ${{ steps.properties.outputs.mod_version }} | |
version-range: ${{ steps.properties.outputs.version_range }} | |
changelog: ${{ steps.changelog.outputs.changelog }} | |
steps: | |
- name: Checkout Sourcecode | |
uses: actions/checkout@v4 | |
- name: calculate versions | |
id: properties | |
uses: christian-draeger/[email protected] | |
with: | |
path: 'gradle.properties' | |
properties: 'minecraft_version mod_version version_range java_version' | |
- name: Changelog | |
id: changelog | |
shell: bash | |
run: | | |
{ | |
echo 'changelog<<EOF' | |
echo "${{ github.event.release.body }}" | |
echo | |
echo EOF | |
} >> $GITHUB_OUTPUT | |
echo "# Changelog ${{ steps.properties.outputs.minecraft_version }} - ${{ steps.properties.outputs.mod_version }}" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "${{ github.event.release.body }}" >> $GITHUB_STEP_SUMMARY | |
build-release: | |
needs: prepare | |
uses: tristankechlo/tristankechlo/.github/workflows/build_and_release_mod.yml@main | |
permissions: | |
contents: write | |
secrets: | |
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | |
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | |
with: | |
java-version: ${{ needs.prepare.outputs.java-version }} | |
curseforge-id: 990499 | |
modrinth-id: "gars5tKl" | |
modid: "whatdidijustkill" | |
mc-version: ${{ needs.prepare.outputs.mc-version }} | |
mod-version: ${{ needs.prepare.outputs.mod-version }} | |
changelog: ${{ needs.prepare.outputs.changelog }} | |
version-range: ${{ needs.prepare.outputs.version-range }} | |
forge: ${{ contains(github.event.release.name, '[RELEASE]') }} | |
fabric: ${{ contains(github.event.release.name, '[RELEASE]') }} | |
neoforge: ${{ contains(github.event.release.name, '[RELEASE]') }} | |
send-discord: | |
needs: [ "prepare", "build-release" ] | |
uses: tristankechlo/tristankechlo/.github/workflows/send_discord.yml@main | |
secrets: | |
WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
with: | |
released: ${{ contains(github.event.release.name, '[RELEASE]') }} | |
changelog: "${{ needs.prepare.outputs.changelog }}" | |
version: "${{ needs.prepare.outputs.mc-version }} - ${{ needs.prepare.outputs.mod-version }}" | |
color: 4739930 | |
content: "${{ contains(github.event.release.name, '[RELEASE]') && '<@&1241816090909081662>' || ''}}" | |
title: "New version for WhatDidIJustKill just released :exclamation:" | |
description: "${{ contains(github.event.release.name, '[RELEASE]') && 'The update is available for *Forge*, *Fabric* and *NeoForge*' || 'The update will *not* be released to Curseforge or Modrinth'}}" | |
curseforge: "https://www.curseforge.com/minecraft/mc-mods/what-did-i-just-kill" | |
modrinth: "https://modrinth.com/mod/what-did-i-just-kill" | |
github: "${{ github.event.release.html_url }}" | |
thumbnail: "https://cdn.modrinth.com/data/gars5tKl/a091e18e53968b3e9eef85f3ddf979175db25c69.png" |