Skip to content

Commit c234f40

Browse files
authored
Shared configs/workflows/dispatch trigger (#141)
* use gh to trigger workflow payload * backtick CSV sha * update cache * fix uids * fix changelog old entries * update cache. * @instructure.ai/[email protected] * fix tests for readme shape * @instructure.ai/[email protected] * @instructure.ai/[email protected]
1 parent efc8999 commit c234f40

File tree

24 files changed

+548
-2826
lines changed

24 files changed

+548
-2826
lines changed

.github/workflows/release-package.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,26 @@ jobs:
163163
env:
164164
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
165165
TAGS: ${{ steps.find_tags.outputs.tags }}
166+
shell: bash
166167
run: |
168+
set -euo pipefail
169+
IFS=$'\n'
170+
167171
for TAG in $TAGS; do
168172
# Extract the package name from the tag (e.g., @instructure.ai/[email protected] => foo)
169173
NAME=$(echo "$TAG" | sed -E 's/@instructure.ai\/([^@]+)@.*/\1/')
170174
EVENT_TYPE="${NAME}_release"
171-
gh api repos/${{ github.repository }}/dispatches \
172-
-F event_type="$EVENT_TYPE" \
173-
-F client_payload="$(jq -nc --arg tag "$TAG" '{tag: $tag}')"
175+
176+
# Build the required JSON payload and POST it
177+
PAYLOAD=$(jq -n \
178+
--arg et "$EVENT_TYPE" \
179+
--arg tag "$TAG" \
180+
'{event_type: $et, client_payload: {tag: $tag}}')
181+
182+
echo "Dispatching event: $EVENT_TYPE with payload: $PAYLOAD"
183+
184+
echo "$PAYLOAD" | gh api repos/${{ github.repository }}/dispatches \
185+
--method POST \
186+
-H "Accept: application/vnd.github+json" \
187+
--input -
174188
done

apps/nutritionfacts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
"update-cache": "vite-node ./scripts/updateCache.mts"
2929
},
3030
"type": "module",
31-
"version": "1.4.4"
31+
"version": "1.5.0"
3232
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"vitest": "^3.2.4",
2323
"yaml": "^2.8.1"
2424
},
25-
"version": "1.4.5",
25+
"version": "1.5.0",
2626
"name": "@instructure.ai/shared-configs",
2727
"packageManager": "[email protected]",
2828
"private": true,

0 commit comments

Comments
 (0)