Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/publish-js-sdk-canary-scheduler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This workflow is responsible for scheduling the JavaScript SDK canary publish workflow on a daily basis.
# The actual publish workflow is defined in `publish-js-sdk.yaml`, which is triggered by this scheduler workflow.
# `publish-js-sdk.yaml` has to be where the publish actually happens so that npm trusted publishing still works.
# npm trusted publishing that only one workflow can publish to npm.

name: Schedule JavaScript SDK Canary Publish

concurrency:
group: publish-js-sdk-canary-scheduler
cancel-in-progress: false

on:
schedule:
- cron: "17 6 * * *"
workflow_dispatch:

jobs:
dispatch-canary-publish:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
actions: write
steps:
- name: Dispatch publish workflow
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: |
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: "publish-js-sdk.yaml",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naive question but why this indirection?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah for the canary input 🧠 maybe smol comment?

ref: "main",
inputs: {
release_type: "canary",
branch: "main",
},
});

- name: Summarize dispatch
run: |
{
echo "## JavaScript SDK Canary Dispatch Queued"
echo
echo "- Workflow: \`publish-js-sdk.yaml\`"
echo "- Release type: \`canary\`"
echo "- Branch: \`main\`"
} >> "$GITHUB_STEP_SUMMARY"
Loading
Loading