Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
handle interactionId in publish workflow
Brendan Allan1ef5c9358184
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.ymlindex 590b64f9b..a642aaf40 100644--- a/.github/workflows/publish.yml+++ b/.github/workflows/publish.yml@@ -1,7 +1,13 @@name: "publish"# change this when ready to release if you want CI/CD-on: workflow_dispatch+on:+ workflow_dispatch:+ inputs:+ interactionId:+ description: "Discord Interaction ID"+ required: false+ type: stringenv:CN_APPLICATION: cap/cap@@ -36,6 +42,8 @@ jobs:const tag = "cap-v${{ steps.read_version.outputs.value }}";const tagRef = `tags/${tag}`;+ core.setOutput(TAG_NAME, tag);+const TAG_EXISTED = "tag_existed";async function main() {@@ -78,9 +86,33 @@ jobs:# TODO: Change to stable version when availableuses: softprops/action-gh-release@v2with:+ tag_name: ${{ steps.read_version.outputs.tag_name }}draft: truegenerate_release_notes: true+ - name: Update Discord interaction+ if: ${{ inputs.interactionId != '' }}+ uses: actions/github-script@v7+ with:+ script: |+ async function main() {+ const token = await core.getIDToken("cap-discord-bot");++ await fetch("https://cap-discord-bot.brendonovich.workers.dev/github-workflow", {+ method: "POST",+ body: JSON.stringify({+ type: "release-ready",+ tag: "${{ steps.read_version.outputs.tag_name }}",+ interactionId: "${{ inputs.interactionId }}"+ }),+ headers: {+ Authorization: `Bearer ${token}`,+ }+ });+ }++ main();+build:needs: draftif: ${{ needs.draft.outputs.needs_release == 'true' }}