Skip to content

Commit

Permalink
Update embed
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNijjar committed Jan 12, 2024
1 parent 37f023f commit 4032d74
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
MAVEN_PASS: ${{ secrets.MAVEN_PASSWORD }}

- name: Upload Forge Releases (Curse/Modrinth/Github)
id: forge_release
if: contains(steps.properties.outputs.enabledPlatforms, 'forge')
uses: Kir-Antipov/[email protected]
with:
Expand All @@ -56,7 +57,13 @@ jobs:
game-versions: ${{ steps.properties.outputs.minecraftVersion }}
version-resolver: exact

dependencies: |
resourceful-lib | depends | *
resourceful-config | depends | *
botarium | depends | *
- name: Upload Fabric Releases (Curse/Modrinth/Github)
id: fabric_release
if: contains(steps.properties.outputs.enabledPlatforms, 'fabric')
uses: Kir-Antipov/[email protected]
with:
Expand All @@ -75,8 +82,17 @@ jobs:
game-versions: ${{ steps.properties.outputs.minecraftVersion }}
version-resolver: exact

dependencies: |
fabric-api | depends | *
resourceful-lib | depends | *
resourceful-config | depends | *
botarium | depends | *
- name: Generate Discord Embed
run: ./gradlew injectEmbed
env:
FORGE_RELEASE_URL: ${{ steps.forge_release.outputs.modrinth-version }}
FABRIC_RELEASE_URL: ${{ steps.fabric_release.outputs.modrinth-version }}

- name: Upload Discord Embed
uses: tsickert/[email protected]
Expand Down
49 changes: 49 additions & 0 deletions templates/embed.json.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"components": [
{
"type": 1,
"components": [
{
"type": 2,
"label": "Fabric",
"style": 5,
"url": "https://modrinth.com/mod/ad_astra/version/${fabric_link}"
},
{
"type": 2,
"label": "Forge",
"style": 5,
"url": "https://modrinth.com/mod/ad_astra/version/${forge_link}"
}
]
}
],
"embeds": [
{
"title": "Ad Astra",
"description": "**Changelog:**\\n${changelog}",
"color": 13997660,
"fields": [
{
"name": "Minecraft Version",
"value": "${minecraft}",
"inline": true
},
{
"name": "Mod Version",
"value": "${version}",
"inline": true
}
],
"footer": {
"text": "Follow the project on Modrinth at mods.gay/ad-astra",
"icon_url": "https://i.imgur.com/3hVj8nM.png"
},
"thumbnail": {
"url": "https://cdn.modrinth.com/data/3ufwT9JF/2a15f23b7ffa2d50fc6ae1c42029a728ce3e2847.jpeg"
}
}
],
"username": "Terrarium Releases",
"avatar_url": "https://cdn.discordapp.com/avatars/955572264823300096/3c226580b871a57b6da095fea1cccf1e.webp"
}

0 comments on commit 4032d74

Please sign in to comment.