[CI] The definition of insanity is... #3
Workflow file for this run
This file contains hidden or 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: Announce Latest Nightly to Discord | ||
|
Check failure on line 1 in .github/workflows/_announce-latest-build.yml
|
||
| 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 }} | ||