-
Notifications
You must be signed in to change notification settings - Fork 0
feat(engine): portable @relaycast/engine package + independent publish flow #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8aa0bf1
feat(engine): add portable @relaycast/engine package + independent pu…
willwashburn 210e629
chore: apply pr-reviewer fixes for #138
agent-relay-bot[bot] 7cfd973
test(engine): add action-contract E2E (npm run e2e:actions)
willwashburn cfb12e6
test(e2e): add --next-version flag (actions contract instead of comma…
willwashburn 1c0fa19
fix(engine): reuse soft-removed A2A proxy agent on re-registration
willwashburn 779ad81
fix(engine): address PR review findings (security, correctness, robus…
willwashburn 93357e0
fix(engine): second pass of PR review findings
willwashburn 15a0b2e
fix(engine): rate limit falls back to a conservative default on entit…
willwashburn e9f03da
fix(engine): address re-review on the previous review fixes
willwashburn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| name: Publish Engine | ||
|
|
||
| # Independent publish flow for @relaycast/engine. | ||
| # | ||
| # The engine is versioned and released SEPARATELY from the lockstep | ||
| # @relaycast/* packages (see publish-npm.yml). This lets the open-core engine | ||
| # ship on its own cadence (e.g. 1.3.0-rc.x on the `next` tag) without bumping | ||
| # the SDK/types/server set. Triggered manually. | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: "Version bump type (ignored if custom_version is set)" | ||
| required: true | ||
| type: choice | ||
| options: | ||
| - prerelease | ||
| - prepatch | ||
| - preminor | ||
| - premajor | ||
| - patch | ||
| - minor | ||
| - major | ||
| default: "prerelease" | ||
| custom_version: | ||
| description: "Custom version, e.g. 1.3.0-rc.0 (overrides bump type)" | ||
| required: false | ||
| type: string | ||
| tag: | ||
| description: "NPM dist-tag" | ||
| required: true | ||
| type: choice | ||
| options: | ||
| - next | ||
| - latest | ||
| - beta | ||
| - alpha | ||
| default: "next" | ||
| dry_run: | ||
| description: "Dry run (do not actually publish)" | ||
| required: false | ||
| type: boolean | ||
| default: true | ||
|
|
||
| concurrency: | ||
| group: publish-engine | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
|
||
| env: | ||
| NPM_CONFIG_FUND: false | ||
|
|
||
| jobs: | ||
| publish: | ||
| name: Build, test & publish @relaycast/engine | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "22.14.0" | ||
| cache: "npm" | ||
| cache-dependency-path: package-lock.json | ||
| registry-url: "https://registry.npmjs.org" | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Set engine version | ||
| id: ver | ||
| working-directory: packages/engine | ||
| env: | ||
| # Bound to env (not interpolated into the script body) to avoid shell | ||
| # injection from the free-form custom_version input. | ||
| CUSTOM_VERSION: ${{ github.event.inputs.custom_version }} | ||
| VERSION_TYPE: ${{ github.event.inputs.version }} | ||
| run: | | ||
| if [ -n "$CUSTOM_VERSION" ]; then | ||
| npm version "$CUSTOM_VERSION" --no-git-tag-version --allow-same-version | ||
| else | ||
| npm version "$VERSION_TYPE" --no-git-tag-version --preid=rc | ||
| fi | ||
| NEW_VERSION=$(node -p "require('./package.json').version") | ||
| echo "version=$NEW_VERSION" >> "$GITHUB_OUTPUT" | ||
| echo "Publishing @relaycast/engine@$NEW_VERSION" | ||
|
|
||
| - name: Build engine (and its workspace deps) | ||
| run: npx turbo build --filter=@relaycast/engine | ||
|
|
||
| - name: Test engine | ||
| run: npx turbo test --filter=@relaycast/engine | ||
| env: | ||
| DO_NOT_TRACK: '1' | ||
|
|
||
| - name: Update npm for OIDC/provenance support | ||
| run: npm install -g npm@latest | ||
|
|
||
| - name: Dry run | ||
| if: github.event.inputs.dry_run == 'true' | ||
| working-directory: packages/engine | ||
| run: npm publish --dry-run --access public --tag "${{ github.event.inputs.tag }}" --ignore-scripts | ||
|
|
||
| - name: Publish to NPM | ||
| if: github.event.inputs.dry_run != 'true' | ||
| working-directory: packages/engine | ||
| run: npm publish --access public --provenance --tag "${{ github.event.inputs.tag }}" --ignore-scripts | ||
|
|
||
| - name: Summary | ||
| if: always() | ||
| run: | | ||
| echo "## Publish Engine" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "**Package**: \`@relaycast/engine\`" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "**Version**: \`${{ steps.ver.outputs.version }}\`" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "**NPM Tag**: \`${{ github.event.inputs.tag }}\`" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "**Dry Run**: \`${{ github.event.inputs.dry_run }}\`" >> "$GITHUB_STEP_SUMMARY" | ||
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.