Skip to content

updates to release process - #941

Open
shrutiburman wants to merge 37 commits into
mainfrom
dummy-gated-release
Open

updates to release process #941
shrutiburman wants to merge 37 commits into
mainfrom
dummy-gated-release

Conversation

@shrutiburman

@shrutiburman shrutiburman commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

https://github.com/twilio/twilio-python/actions/runs/30338829496/job/90209602082?pr=941
Migrate PyPI publishing to OIDC trusted publishing

New Release flow-

[Librarian]git tag vX.Y.Z && git push --tags →
[Github Actions] test → approve [Manual] → GitHub Release → publish to Pypi

deploy.yml — New release workflow (replaces test-and-deploy.yml's publish path)

  • Keyless publish to PyPI via OIDC trusted publishing — no more stored PYPI_TOKEN
  • Triggered on tag push (v*), creates GitHub Release automatically
  • production environment approval gate before publish
  • Tag format validation (vX.Y.Z) + version match against setup.py
  • PEP 740 attestations on every release
  • Dependencies resolved through curated Artifactory (ecosystem: python)
  • Lockfile hygiene scan on requirements*.txt
  • Full test matrix (3.8–3.13) with fail-fast: false

.github/workflows/ci.yml— Weekly pre-release readiness check

  • Runs every Monday 9AM IST + manual dispatch
  • Validates lockfile hygiene (no internal Artifactory hosts in requirements files)
  • Full test + build pipeline
  • Validates version format, builds sdist/wheel, verifies with twine check
  • Does NOT publish — dry run only
  • Slack notification on cron failure

Also in this PR

  • Switched from local .github/artifactory-oidc to shared twilio/sdk-actions/artifactory-oidc with
    ecosystem: python
  • Deleted local .github/artifactory-oidc/ composite action
  • Updated actions/checkout SHA to Node 24-compatible version

Prerequisites (before first real release)

  • PyPI trusted publisher registered for twilio package (owner: twilio, repo: twilio-python,
    workflow: deploy.yml, environment: production)
  • production GitHub environment created with required reviewers
  • Repo added to Artifactory OIDC trust — SSC team
  • Repo added to ubuntu-x64 runner group — Enterprise admin
  • vars.ARTIFACTORY_URL set to https://twilio.jfrog.io

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

shrutiburman and others added 30 commits July 22, 2026 11:56
Co-authored-by: semgrep-code-twilio[bot] <242513856+semgrep-code-twilio[bot]@users.noreply.github.com>
Updated the runs-on condition to use 'ubuntu-x64' for both test and deploy-dry-run jobs.
Comment out aiohttp dependency in setup.py
Comment out the aiohttp-retry dependency in setup.py
@twilio-dx
twilio-dx force-pushed the dummy-gated-release branch from 8ea067d to c56c9fd Compare July 27, 2026 11:22
Comment thread .github/workflows/deploy.yml Outdated
manisha1997
manisha1997 previously approved these changes Jul 27, 2026
Comment thread .github/workflows/deploy.yml Outdated
@shrutiburman
shrutiburman requested a review from manisha1997 July 28, 2026 12:59
Comment thread .github/workflows/deploy.yml Outdated
@twilio-dx
twilio-dx force-pushed the dummy-gated-release branch from e9bf528 to 35db398 Compare July 30, 2026 06:34
Comment thread .github/workflows/deploy.yml Outdated
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create "${{ github.ref_name }}" --generate-notes

@shrutiburman shrutiburman Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We should be using uses: sendgrid/dx-automator/actions/release@main release here but that is currently blocked

Tradeoff-
gh release create --generate-notes: auto-generates notes from PR titles and commit messages since the last tag. No changelog file involved.
dx-automator/actions/release: reads CHANGES.md (or CHANGELOG.md) in the repo, finds the section matching the release version, and uses that as the release body. So the release notes on GitHub match exactly what's written in the changelog file.

run: echo "GITHUB_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Create GitHub Release
uses: sendgrid/dx-automator/actions/release@08b601b726671445abc798ed59881766ec8fefc6

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

test run
throws exception from inside the action, as expected

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.

3 participants