Skip to content

feat(workflow): add GitHub Actions workflow for publishing agentflow sdk#5908

Merged
jocelynlin-wd merged 4 commits intomainfrom
feat/agentflow-publish-workflow
Mar 5, 2026
Merged

feat(workflow): add GitHub Actions workflow for publishing agentflow sdk#5908
jocelynlin-wd merged 4 commits intomainfrom
feat/agentflow-publish-workflow

Conversation

@jocelynlin-wd
Copy link
Contributor

@jocelynlin-wd jocelynlin-wd commented Mar 5, 2026

  • Introduced a new workflow to handle version bumps and publishing of the @flowiseai/agentflow package.
  • Supports various version bump types (prerelease, patch, minor, major, custom) and allows for custom version input.
  • Includes a dry-run step to validate the version and simulate the publish process before actual deployment.
  • Configured to use pnpm for dependency management and publishing tasks.

Workflow Flow

Trigger (manual dispatch)
        │
        ▼
┌───────────────┐
│   dry-run     │  1. Validates semver (custom bump only)
│               │  2. Installs deps, sets version via bump type
│               │  3. Resolves & logs version to job summary
│               │  4. Lists package contents (npm pack --dry-run)
│               │  5. Runs publish --dry-run
└───────┬───────┘
        │ (passes)
        ▼
┌───────────────┐
│   approval    │  Pauses here — requires manual approval via
│   gate        │  the "npm-publish" GitHub environment
└───────┬───────┘
        │ (approved)
        ▼
┌───────────────┐
│   publish     │  1. Installs deps, sets version
│               │  2. Publishes to npm with selected dist-tag
│               │  3. Creates a PR to bump package.json version
└───────┬───────┘
        │ (PR created)
        ▼
┌───────────────┐
│   version     │  Team member reviews and merges the
│   bump PR     │  auto-generated version bump PR
└───────────────┘

Inputs

Input Required Default Description
bump Yes prerelease Version bump type: prerelease, patch, minor, major, custom
custom_version No Exact semver version (only used when bump is custom)
tag No dev npm dist-tag: dev or latest

…/agentflow

- Introduced a new workflow to handle version bumps and publishing of the @flowiseai/agentflow package.
- Supports various version bump types (prerelease, patch, minor, major, custom) and allows for custom version input.
- Includes a dry-run step to validate the version and simulate the publish process before actual deployment.
- Configured to use pnpm for dependency management and publishing tasks.
@gemini-code-assist
Copy link
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@mmattu-wd mmattu-wd self-requested a review March 5, 2026 00:32
- Changed permissions for the GitHub Actions workflow to allow write access for contents.
- Added a step to commit and push the version bump for the @flowiseai/agentflow package after publishing.
Copy link

@mmattu-wd mmattu-wd left a comment

Choose a reason for hiding this comment

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

small things but looks good to give a test run

- major
- custom
custom_version:
description: 'Custom version (only used when bump is "custom", e.g. 1.0.0-beta.1)'

Choose a reason for hiding this comment

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

is there a risk with how we accept a string value for custom version that is interpolated directly into the shell below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shell injection fix — all ${{ inputs.custom_version }} and ${{ inputs.bump }} are now passed via env: blocks and referenced as $CUSTOM_VERSION / $BUMP in shell. This prevents injection since env vars are safely quoted, unlike ${{ }} which is interpolated directly into the shell script before execution.

- Added permission for pull-requests in the GitHub Actions workflow.
- Modified the version bump step to create a new branch and open a pull request after committing the version bump for the @flowiseai/agentflow package.
runs-on: ubuntu-latest
environment: npm-publish
permissions:
contents: write
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is for PR creation, will review if we really want PR creation since it will require us to either give github actions write permission to the repo or use a fine-grained PAT for the PR creation job.

@jocelynlin-wd jocelynlin-wd merged commit 09f2a15 into main Mar 5, 2026
7 checks passed
@jocelynlin-wd jocelynlin-wd deleted the feat/agentflow-publish-workflow branch March 5, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants