Modular logistics and supply chain operating system (LSOS)
JavaScript driver-appfleet-managementfreight-managementinfrastructureinventory-managementlast-mile-deliverylogisticsondemandopen-sourceorder-managementroute-optimizationsupply-chain-managementtracking-and-monitoringtransport-management-systemtransportationwarehouse-management
attempt #2 to fix the discord announcement
Ronald A. Richardson01883da5a2b9
diff --git a/.github/workflows/discord-announcement.yml b/.github/workflows/discord-announcement.ymlindex 3a0479e2..4f65754d 100644--- a/.github/workflows/discord-announcement.yml+++ b/.github/workflows/discord-announcement.yml@@ -1,12 +1,10 @@name: Discord Announcementon:- # automatic announcement after the “Create Release” workflow finishesworkflow_run:workflows: ["Create Release"]types: [completed]- # manual resend / missed-release buttonworkflow_dispatch:inputs:tag:@@ -18,40 +16,30 @@ jobs:runs-on: ubuntu-lateststeps:- # 1️⃣ Decide which tag we’re talking about- - name: Resolve tag name- id: vars+ # 1️⃣ Resolve which tag we’re talking about+ - id: varsrun: |- if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then+ if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; thenecho "tag=${{ github.event.inputs.tag }}" >> "$GITHUB_OUTPUT"elseecho "tag=${{ github.event.workflow_run.head_branch }}" >> "$GITHUB_OUTPUT"fi- echo "TAG is ${{ steps.vars.outputs.tag }}"# 2️⃣ Check out the exact commit that tag points to- - name: Checkout release source- uses: actions/checkout@v3+ - uses: actions/checkout@v3with:ref: ${{ steps.vars.outputs.tag }}fetch-depth: 1- # 3️⃣ Read RELEASE.md and base-64 encode so multiline text survives- - name: Read release notes- id: notes+ # 3️⃣ Store RELEASE.md as a *multi-line* output, using heredoc syntax+ - id: notesrun: |- body="$(cat RELEASE.md)"- echo "b64=$(echo "$body" | base64 -w0)" >> "$GITHUB_OUTPUT"+ echo "body<<EOF" >> "$GITHUB_OUTPUT"+ cat RELEASE.md >> "$GITHUB_OUTPUT"+ echo "EOF" >> "$GITHUB_OUTPUT"- # 4️⃣ Decode for Discord- - name: Decode notes- id: decode- run: |- echo "text=$(echo '${{ steps.notes.outputs.b64 }}' | base64 --decode)" >> "$GITHUB_OUTPUT"-- # 5️⃣ Send the message- - name: Send announcement to Discord- uses: tsickert/[email protected]+ # 4️⃣ Post to Discord+ - uses: tsickert/[email protected]with:webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}username: Fleetbase@@ -59,6 +47,6 @@ jobs:@everyone📦 **Fleetbase ${{ steps.vars.outputs.tag }} released!**- ${{ steps.decode.outputs.text }}+ ${{ steps.notes.outputs.body }}- <https://github.com/fleetbase/fleetbase/releases/tag/${{ steps.vars.outputs.tag }}>\ No newline at end of file+ <https://github.com/${{ github.repository }}/releases/tag/${{ steps.vars.outputs.tag }}>\ No newline at end of file