Skip to content

[CI] The definition of insanity is... #3

[CI] The definition of insanity is...

[CI] The definition of insanity is... #3

name: Announce Latest Nightly to Discord

Check failure on line 1 in .github/workflows/_announce-latest-build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/_announce-latest-build.yml

Invalid workflow file

(Line: 34, Col: 14): Unexpected symbol: '$'. Located at position 10 within expression: fromJson($(cat version-info.json)).version
on:
workflow_call:
workflow_dispatch:
inputs:
diagnostic_mode:
description: Diagnostic Mode
type: boolean
default: false
required: true
jobs:
announce:
name: Discord Announcement
runs-on: ubuntu-22.04
steps:
- name: Grab JAR and Info
uses: actions/download-artifact@v4
with:
name: release
path: .
- name: Announce Timestamp
id: timestamp
run: echo "buildTimestamp=$(date --iso-8601=seconds)" >> $GITHUB_OUTPUT
- name: Read Package Info
id: package_info
run: echo "latestJson=$(cat compactmachines.json)" >> $GITHUB_OUTPUT
- name: Read Version Info
id: version_info
run: echo "version=${{ fromJson($(cat version-info.json)).version }}" >> $GITHUB_OUTPUT
- name: Announce Release
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.DISCORD_NIGHTLY_WEBHOOK }}
avatar-url: "https://compactmods.dev/personal-shrinking-device.png"
content: "**New Version Available: Compact Machines v${{ steps.version_info.outputs.version }}**"
filename: ${{ fromJson(steps.package_info.outputs.latestJson)[0].name }}
embed-title: "**Mod File Information**"
embed-description: "Filename: ${{ fromJson(steps.package_info.outputs.latestJson)[0].name}}"
embed-url: "https://www.curseforge.com/minecraft/mc-mods/compact-machines"
embed-thumbnail-url: "https://media.forgecdn.net/avatars/thumbnails/10/602/64/64/635460270800375500.png"
embed-timestamp: ${{ steps.timestamp.outputs.buildTimestamp }}