Skip to content

docs: add release process documentation and fix workflow#76

Open
cmworkato wants to merge 3 commits intomainfrom
docs/release-process
Open

docs: add release process documentation and fix workflow#76
cmworkato wants to merge 3 commits intomainfrom
docs/release-process

Conversation

@cmworkato
Copy link
Copy Markdown
Contributor

Summary

This PR adds documentation for the release process and fixes the PyPI workflow trigger.

Changes

1. Release Process Documentation (docs/RELEASE_PROCESS.md)

Complete guide covering:

  • Creating feature/bug fix branches
  • Local development and testing
  • PR workflow
  • Publishing to Test PyPI for validation
  • Publishing to Production PyPI
  • Troubleshooting common issues

2. PyPI Workflow Fix

Removed tag triggers from the workflow. Previously, pushing a version tag would trigger the workflow but fail due to environment protection rules (only the release branch is allowed to deploy to the release environment).

Now the workflow only triggers on:

  • Push to test branch → Test PyPI
  • Push to release branch → Production PyPI
  • Manual workflow_dispatch

The release branch push finds the tag for versioning, so tag triggers are unnecessary.

Testing

  • Verified workflow syntax
  • Documented the correct release order to avoid failures

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 26, 2026

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py68494%10–11, 69–70
cli
   __init__.py52394%49, 51, 60
   containers.py270100% 
cli/commands
   __init__.py00100% 
   api_clients.py292996%27, 302, 448–449, 483, 493, 585, 616, 624
   api_collections.py257398%28, 183, 347
   assets.py47295%57–58
   connections.py526599%596, 598, 604, 642, 995
   data_tables.py165596%31, 253, 267, 321–322
   guide.py166199%106
   init.py1080100% 
   profiles.py3512892%353, 370, 372–373, 376, 378, 381–384, 386–387, 389, 460–461, 541–542, 544–545, 547–548, 552, 556–557, 567–569, 622
   properties.py97198%21
   pull.py172298%193–194
   workspace.py39294%61, 71
cli/commands/connectors
   __init__.py00100% 
   command.py103298%131, 180
   connector_manager.py203498%176, 292, 300–301
cli/commands/projects
   __init__.py00100% 
   command.py2721096%359–362, 373, 439–441, 491, 495
   project_manager.py166795%48, 66, 263–264, 276, 317, 325
cli/commands/push
   __init__.py00100% 
   command.py133496%109, 112, 230, 308
cli/commands/recipes
   __init__.py00100% 
   command.py427997%117, 133–134, 272–275, 403, 709
   validator.py7062097%174, 883, 1136, 1223, 1246, 1279, 1281–1282, 1359–1361, 1457–1458, 1517–1518, 1707–1708, 1736–1738
cli/utils
   __init__.py40100% 
   exception_handler.py3453390%134–135, 140–141, 143–144, 174–175, 181, 184–185, 270, 300, 333–337, 371, 398, 425, 482, 517, 576, 578–579, 584–585, 587–591
   gitignore.py140100% 
   ignore_patterns.py230100% 
   spinner.py430100% 
   token_input.py451762%70, 98, 100, 102–104, 107, 124, 127–128, 132–133, 136, 139–140, 142, 144
   version_checker.py135695%24, 26, 33–34, 72, 102
cli/utils/config
   __init__.py50100% 
   manager.py5373393%130, 141, 152, 160–162, 165, 168, 180, 230–231, 404, 422, 426, 429–432, 448, 469, 483, 496, 538, 640–641, 680, 894, 1037–1038, 1052–1053, 1109, 1168
   models.py330100% 
   profiles.py3341595%99, 195–196, 199, 234–236, 261–263, 522, 530, 541–542, 546
   workspace.py680100% 
TOTAL596322596% 

@cmworkato cmworkato requested review from oalami and zaynelt March 26, 2026 22:56
Comment on lines +163 to +168
### Why This Order Matters

The PyPI workflow triggers on:

- Push to `release` branch
- Push of version tags (e.g., `1.0.6`)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Docs contradict the workflow change in this PR

This section (and related content below) describes tag pushes as a valid workflow trigger, but this PR removes the tag triggers from pypi.yml:

-    tags:
-      - '[0-9]+.[0-9]+.[0-9]+'
-      - '[0-9]+.[0-9]+.[0-9]+-*'

After this PR, pushing a version tag will not trigger the workflow at all. The following content is now inaccurate:

  • Lines 165–168: "The PyPI workflow triggers on: ... Push of version tags" — tags are no longer a trigger
  • Line 188 (Workflow Triggers Summary table): the | Push version tag | ... row documents a trigger that no longer exists
  • Lines 170–175 ("If you push the tag first..."): the entire ordering rationale is moot since tag pushes no longer trigger anything
  • Lines 194–200 (Troubleshooting: "Tag is not allowed to deploy..."): this failure mode can no longer occur

The fix is to remove or rewrite these sections to reflect the branch-only trigger model, and clarify that tags are only needed for hatch-vcs versioning (so the release branch can read the version), not for triggering the workflow.

Tags triggered the workflow but failed environment protection rules.
The release branch trigger is sufficient - it finds the tag for versioning.
@cmworkato cmworkato force-pushed the docs/release-process branch from 987410a to df04147 Compare March 26, 2026 23:22
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Comment on lines 169 to 171
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
if: needs.prepare.outputs.environment == 'release'
with:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: uses: directive accidentally deleted, leaving step with duplicate if: keys and no action to run.

The uses: softprops/action-gh-release@v1 line was replaced by a second if: condition instead of being placed alongside it. This results in two problems:

  1. The step has no uses: (or run:) directive — GitHub Actions will fail to parse/execute it.
  2. Duplicate if: keys are invalid YAML; the second silently overwrites the first, discarding the startsWith(github.ref, 'refs/tags/') condition.

See the affected lines:

- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/')
if: needs.prepare.outputs.environment == 'release'
with:
files: dist/*
generate_release_notes: true
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Suggested change
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
if: needs.prepare.outputs.environment == 'release'
with:
if: needs.prepare.outputs.environment == 'release'
uses: softprops/action-gh-release@v1
with:

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.

1 participant