Comprehensive workflow automation for Go Corp projects with release management, CI/CD integration, and deployment orchestration.
- π Automated Release Management - Semantic versioning, changelog generation, and Git tagging
- π GitHub Integration - PR creation, auto-merge, and GitHub releases
- π¦ NPM Publishing - Automated package publishing with registry support
- π Multi-Platform Deployment - Support for Cloudflare Workers, Vercel, Netlify, AWS, and custom targets
- π Changelog Management - Conventional commits parsing and automated changelog generation
- π― Interactive CLI - User-friendly command-line interface with smart defaults
- βοΈ Flexible Configuration - Project-specific settings with environment overrides
- π§ͺ Built-in Testing - Integration with testing frameworks and quality gates
npm install -g @golive_me/go-workflow
# or
yarn global add @golive_me/go-workflow
# or
pnpm add -g @golive_me/go-workflowcd your-project
go-workflow initThis creates a .go-workflow.config.js file with your project settings.
# Interactive release
go-workflow release
# Deploy to configured targets
go-workflow deploy
# Check status
go-workflow status
# Feature branch workflow
go-workflow featureInitialize workflow configuration in your project.
go-workflow init [options]
Options:
-f, --force Overwrite existing configurationInteractive release management with automated versioning.
go-workflow release [options]
Options:
-t, --type <type> Release type (patch|minor|major)
--no-interactive Run in non-interactive mode
--deploy Deploy after release
--no-github Skip GitHub release creation
--no-npm Skip npm publishingFeature branch release workflow with PR automation.
go-workflow feature [options]
Options:
-t, --title <title> Feature title
-d, --description <desc> Feature description
--no-interactive Run in non-interactive mode
--auto-merge Enable auto-merge for PRDeploy to configured deployment targets.
go-workflow deploy [options]
Options:
-t, --target <target> Specific deployment target
--all Deploy to all targets
--no-confirm Skip confirmation promptsShow project and workflow status.
go-workflow statusView or edit configuration.
go-workflow config [options]
Options:
--show Show current configuration
--edit Edit configuration fileCreate a .go-workflow.config.js file in your project root:
export default {
// Project information
name: 'my-awesome-project',
repository: 'https://github.com/my-org/my-project',
defaultBranch: 'main',
// Deployment targets
deployments: [
{
target: 'cloudflare-workers',
name: 'Cloudflare Workers',
command: 'wrangler deploy',
confirmRequired: false,
},
{
target: 'vercel',
name: 'Vercel Production',
command: 'vercel --prod',
confirmRequired: true,
env: {
VERCEL_TOKEN: process.env.VERCEL_TOKEN,
},
},
],
// GitHub integration
github: {
autoRelease: true,
autoMerge: true,
labels: ['enhancement', 'automated'],
},
// NPM publishing
npm: {
registry: 'https://registry.npmjs.org',
access: 'public',
autoPublish: false,
},
// Changelog configuration
changelog: {
path: 'CHANGELOG.md',
includeTypes: ['feat', 'fix', 'perf', 'refactor', 'docs'],
sections: [
{ title: 'π Features', types: ['feat'] },
{ title: 'π Bug Fixes', types: ['fix'] },
{ title: 'β‘ Performance', types: ['perf'] },
],
},
// Custom commands
commands: {
preRelease: ['npm run build', 'npm test'],
postRelease: ['npm run docs'],
},
}Override configuration with environment variables:
# GitHub settings
export GO_WORKFLOW_AUTO_RELEASE=true
export GO_WORKFLOW_AUTO_MERGE=false
# NPM settings
export GO_WORKFLOW_AUTO_PUBLISH=true
export NPM_REGISTRY=https://registry.npmjs.orgAdd configuration directly to your package.json:
{
"name": "my-project",
"version": "1.0.0",
"go-workflow": {
"deployments": [
{
"target": "cloudflare-workers",
"command": "wrangler deploy"
}
],
"github": {
"autoRelease": true
}
}
}{
target: 'cloudflare-workers',
name: 'Production Worker',
command: 'wrangler deploy',
env: {
CLOUDFLARE_API_TOKEN: process.env.CLOUDFLARE_API_TOKEN,
},
}{
target: 'vercel',
name: 'Vercel Production',
command: 'vercel --prod',
preCommand: 'npm run build',
env: {
VERCEL_TOKEN: process.env.VERCEL_TOKEN,
},
}{
target: 'netlify',
name: 'Netlify Production',
command: 'netlify deploy --prod',
preCommand: 'npm run build',
env: {
NETLIFY_AUTH_TOKEN: process.env.NETLIFY_AUTH_TOKEN,
},
}{
target: 'aws',
name: 'AWS Production',
command: 'aws s3 sync dist/ s3://my-bucket --delete',
preCommand: 'npm run build',
postCommand: 'aws cloudfront create-invalidation --distribution-id E123456789 --paths "/*"',
}{
target: 'custom',
name: 'Custom Deployment',
command: 'docker build -t my-app . && docker push my-registry/my-app',
confirmRequired: true,
}The workflow automatically generates changelogs from conventional commits:
feat: New featuresfix: Bug fixesperf: Performance improvementsrefactor: Code refactoringdocs: Documentation changesstyle: Code style changestest: Test changesbuild: Build system changesci: CI configuration changeschore: Maintenance tasks
Mark breaking changes with ! or BREAKING CHANGE::
git commit -m "feat!: remove deprecated API"
# or
git commit -m "feat: new API
BREAKING CHANGE: The old API has been removed. Use newAPI() instead."- Install GitHub CLI
- Authenticate:
gh auth login - Configure repository access
- Automatic PR Creation: Creates PRs for feature branches
- Auto-merge: Enables auto-merge with squash strategy
- Release Creation: Generates GitHub releases with detailed notes
- Workflow Integration: Waits for CI checks before merging
# Create feature branch
git checkout -b feature/new-api
# Make changes and commit
git add .
git commit -m "feat: add new API endpoint"
# Push and create PR
git push -u origin feature/new-api
go-workflow feature --auto-merge- NPM account with publishing permissions
- Authentication:
npm login - Package configured for publishing
# Automatic publishing during release
go-workflow release --deploy
# Manual publishing
npm run build
npm publish// .go-workflow.config.js
export default {
npm: {
registry: 'https://npm.your-company.com',
access: 'private',
tag: 'latest',
},
}Use the workflow API in your own scripts:
import { createWorkflow, quickRelease } from '@golive_me/go-workflow'
// Create workflow instance
const workflow = await createWorkflow()
// Execute release
const result = await workflow.executeRelease('minor', {
deploy: true,
createGitHubRelease: true,
})
console.log(`Released version ${result.version.to}`)
// Quick release
await quickRelease('patch')import {
createGitOperations,
createChangelogManager,
createGitHubIntegration,
createNpmPublisher,
} from '@golive_me/go-workflow'
// Individual components
const git = createGitOperations()
const changelog = createChangelogManager()
const github = createGitHubIntegration()
const npm = createNpmPublisher()
// Custom workflow
const currentVersion = git.getCurrentVersion()
const commits = await git.getCommitsSince()
const entry = changelog.generateEntry('1.2.0', commits)
await github.createRelease({
title: 'v1.2.0',
body: 'Release notes...',
tag: 'v1.2.0',
prerelease: false,
})# Initialize new project
mkdir my-project && cd my-project
npm init -y
git init
# Install workflow
npm install --save-dev @golive_me/go-workflow
# Initialize configuration
npx go-workflow init
# Make first release
git add .
git commit -m "feat: initial release"
npx go-workflow release// .go-workflow.config.js
export default {
deployments: [
{
target: 'cloudflare-workers',
name: 'API Worker',
command: 'npm run deploy:api',
cwd: './packages/api',
},
{
target: 'vercel',
name: 'Frontend App',
command: 'vercel --prod',
cwd: './packages/frontend',
},
],
commands: {
preRelease: [
'npm run build --workspaces',
'npm run test --workspaces',
],
},
}# .github/workflows/release.yml
name: Release
on:
push:
branches: [main]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: npm ci
- run: npx go-workflow release --no-interactive
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}git clone https://github.com/go-corp/workflow.git
cd workflow
npm install
npm run buildnpm test
npm run test:watch
npm run test:coverage- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT License - see LICENSE file for details.
- π Documentation
- π Issue Tracker
- π¬ Discussions
Made with β€οΈ by the Go Corp team