-
Notifications
You must be signed in to change notification settings - Fork 8
chore(ci): more tweaks to the release process #361
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -15,7 +15,7 @@ All workflows that use `.github/actions/setup-python-env` now default to the ver | |||||
| | [gpu-tests.yml](gpu-tests.yml) | Nightly , manual | GPU smoke tests (required) and E2E tests | | ||||||
| | [conventional-commit.yml](conventional-commit.yml) | PRs | Validates PR titles follow conventional commit format | | ||||||
| | [docs.yml](docs.yml) | Push to `main` (docs paths) | Builds and deploys documentation to GitHub Pages | | ||||||
| | [release.yml](release.yml) | Manual dispatch | Builds and publishes package to Test PyPI or PyPI (production) | | ||||||
| | [release.yml](release.yml) | Push tags to `v*` | Builds and publishes package to Test PyPI or PyPI (production) | | ||||||
| | [secrets-detector.yml](secrets-detector.yml) | PRs | Scans for accidentally committed secrets | | ||||||
|
|
||||||
| ## Pull Request Testing (copy-pr-bot) | ||||||
|
|
@@ -93,15 +93,13 @@ flowchart LR | |||||
| push --> ci & gpu | ||||||
| cpb --> gpu | ||||||
| pr --> ci & conventional & secrets | ||||||
| manual --> release | ||||||
| tag[Tag push v[0-9]*] --> internalRelease | ||||||
| tag[Tag push v[0-9]*] --> release | ||||||
|
||||||
|
|
||||||
| buildWheel --> publishPyPI --> ghRelease --> slackNotify | ||||||
| buildWheelInt --> publishArtifactory | ||||||
|
|
||||||
| conventional -.->|reuses| FW-CI-templates | ||||||
| secrets -.->|reuses| FW-CI-templates | ||||||
| release -.->|reuses| FW-CI-templates | ||||||
| ``` | ||||||
|
Comment on lines
101
to
103
|
||||||
|
|
||||||
| ## CI Checks Workflow | ||||||
|
|
@@ -197,123 +195,23 @@ Or comment on the PR: `I have read the DCO Document and I hereby sign the DCO` | |||||
|
|
||||||
| Scans PRs for accidentally committed secrets. False positives can be added to `.github/workflows/config/.secrets.baseline`. | ||||||
|
|
||||||
| ## Internal Release Workflow | ||||||
|
|
||||||
| The `internal-release.yml` workflow builds a wheel and publishes it to NVIDIA Artifactory or PyPI. | ||||||
|
|
||||||
| ### Triggers | ||||||
|
|
||||||
| **Tag push (automatic):** Pushing a `v[0-9]*` tag (e.g. `git tag v0.2.0 && git push --tags`) automatically builds and publishes to Artifactory. This is the primary release mechanism. | ||||||
|
|
||||||
| **Manual dispatch:** Go to Actions > Internal Release and run with: | ||||||
|
|
||||||
| - `release-ref`: Branch, tag, or commit SHA to build (defaults to `main`) | ||||||
| - `publish-target`: `artifactory` (default) or `pypi` | ||||||
|
|
||||||
| ### How to Publish Internally | ||||||
|
|
||||||
| Tag-based (recommended): | ||||||
|
|
||||||
| ```bash | ||||||
| git tag v0.2.0 | ||||||
| git push --tags | ||||||
| ``` | ||||||
|
|
||||||
| This triggers the workflow automatically and publishes to Artifactory. | ||||||
|
|
||||||
| Via GitHub Actions (manual): | ||||||
|
|
||||||
| 1. Go to Actions > Internal Release | ||||||
| 2. Click Run workflow | ||||||
| 3. Enter the branch, tag, or commit SHA to build | ||||||
| 4. Select publish target (`artifactory` or `pypi`) | ||||||
|
|
||||||
| Requires `ARTIFACTORY_USERNAME`, `ARTIFACTORY_TOKEN`, and `ARTIFACTORY_INTERNAL_URL` secrets for Artifactory; `TWINE_USERNAME` and `TWINE_PASSWORD` for PyPI. | ||||||
|
|
||||||
| Locally (via Makefile): | ||||||
|
|
||||||
| Add the required env vars to your `.env.local` (git-ignored, auto-loaded by mise): | ||||||
|
|
||||||
| ```bash | ||||||
| TWINE_REPOSITORY_URL=<artifactory-repo-url> | ||||||
| TWINE_USERNAME=<your-username> | ||||||
| TWINE_PASSWORD=<your-api-key> | ||||||
| ``` | ||||||
|
|
||||||
| Then run: | ||||||
|
|
||||||
| ```bash | ||||||
| # Build wheel only | ||||||
| make build-wheel | ||||||
|
|
||||||
| # Build and publish to Artifactory | ||||||
| make publish-internal | ||||||
| ``` | ||||||
|
|
||||||
| ## Release Workflow (Production) | ||||||
|
|
||||||
| The production release workflow uses the [FW-CI-templates `_release_library.yml`](https://github.com/NVIDIA-NeMo/FW-CI-templates) reusable workflow to publish to PyPI. | ||||||
| The production release workflow publishes to test PyPI and regular PyPI. It also creates release notes | ||||||
|
||||||
| The production release workflow publishes to test PyPI and regular PyPI. It also creates release notes | |
| The production release workflow publishes to Test PyPI and PyPI. It also creates GitHub Release notes automatically via `gh release create --generate-notes`. |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -22,22 +22,9 @@ | |||||||
| name: "Release NeMo Safe Synthesizer" | ||||||||
|
|
||||||||
| on: | ||||||||
| workflow_dispatch: | ||||||||
| inputs: | ||||||||
| release-ref: | ||||||||
| description: Full SHA (not short) or tag of the commit to build | ||||||||
| required: true | ||||||||
| type: string | ||||||||
| dry-run: | ||||||||
| description: "Dry Run: only publish to Test PyPI" | ||||||||
| required: true | ||||||||
| default: true | ||||||||
| type: boolean | ||||||||
| create-gh-release: | ||||||||
| description: Create a GitHub release | ||||||||
| required: true | ||||||||
| default: true | ||||||||
| type: boolean | ||||||||
| push: | ||||||||
| tags: | ||||||||
| - 'v*' | ||||||||
|
mckornfield marked this conversation as resolved.
mckornfield marked this conversation as resolved.
|
||||||||
|
|
||||||||
| defaults: | ||||||||
| run: | ||||||||
|
|
@@ -48,15 +35,14 @@ permissions: | |||||||
|
|
||||||||
| jobs: | ||||||||
| publish-wheel: | ||||||||
| name: Publish wheel (${{ inputs.dry-run && 'Test PyPI' || 'PyPI' }}) | ||||||||
| name: Publish wheel Test PyPI and PyPI | ||||||||
| runs-on: linux-amd64-cpu4 | ||||||||
| outputs: | ||||||||
| version: ${{ steps.build.outputs.version }} | ||||||||
| steps: | ||||||||
| - name: Checkout at release ref | ||||||||
| uses: actions/checkout@v6 | ||||||||
| with: | ||||||||
| ref: ${{ inputs.release-ref }} | ||||||||
| fetch-depth: 0 | ||||||||
| fetch-tags: true | ||||||||
|
|
||||||||
|
|
@@ -98,7 +84,6 @@ jobs: | |||||||
| dist/*.whl | ||||||||
|
|
||||||||
| - name: Publish to PyPI | ||||||||
|
||||||||
| - name: Publish to PyPI | |
| - name: Publish to PyPI | |
| if: ${{ !contains(github.ref_name, 'rc') && !contains(github.ref_name, 'alpha') && !contains(github.ref_name, 'beta') && !contains(github.ref_name, '.dev') }} |
Copilot
AI
Apr 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that this workflow always publishes to PyPI on tag pushes, it’s hard to recover from partial failures by re-running the job: PyPI rejects re-uploading the same file, and the upload command here doesn’t use --skip-existing (unlike the Test PyPI step). Consider adding --skip-existing or handling the “already exists” error so reruns can proceed to GitHub release creation.
Copilot
AI
Apr 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gh release create "v${VERSION}" derives the tag name from the built wheel version, but the workflow is triggered by a pushed tag. If the pushed tag and computed VERSION diverge, this can create a release (and possibly a new tag) that doesn’t match the triggering ref. Consider using the triggering tag (github.ref_name) as the release tag and failing fast if it doesn’t match the wheel-derived version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The release workflow now publishes to both Test PyPI and PyPI on every
v*tag push, but this table entry still says “Test PyPI or PyPI”. Update the wording to match the current behavior (e.g., “Test PyPI then PyPI”).