Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b4c3862
add all workflows for gated release
shrutiburman Jul 22, 2026
91a4751
add a test workflow
shrutiburman Jul 22, 2026
8741919
Apply suggestion from @semgrep-code-twilio[bot]
shrutiburman Jul 22, 2026
e4e70c6
add a test workflow
shrutiburman Jul 22, 2026
61e0cdd
Update runner conditions for GitHub Actions workflow
shrutiburman Jul 23, 2026
180114f
Change runs-on to 'ubuntu-x64' in workflows
shrutiburman Jul 23, 2026
5becd71
updates
shrutiburman Jul 23, 2026
2f2060b
Comment out aiohttp dependency to try out
shrutiburman Jul 23, 2026
ce4d5f4
Comment out aiohttp-retry dependency
shrutiburman Jul 23, 2026
b86c974
test push from token locally
shrutiburman Jul 23, 2026
ba4246c
test the pat from local testing
twilio-dx Jul 23, 2026
d62ff0e
test dummy commit from Librarian pod ssh
twilio-dx Jul 23, 2026
7b1183c
test librarian ssh cmd
twilio-dx Jul 23, 2026
a95dc7e
test push
twilio-dx Jul 23, 2026
d713fee
push from librarian
twilio-dx Jul 23, 2026
4f109d3
prettify
twilio-dx Jul 24, 2026
25d4e59
prettify
twilio-dx Jul 24, 2026
0517180
Update test-release.yml
shrutiburman Jul 24, 2026
30f1c34
Update deploy.yml
shrutiburman Jul 24, 2026
56d4bb9
move the workflow to correct folder
shrutiburman Jul 24, 2026
2396bcf
add workflow templates
shrutiburman Jul 24, 2026
e9c8690
add workflow templates and RC tag
shrutiburman Jul 24, 2026
7ce4e76
update sha
shrutiburman Jul 24, 2026
30aecdb
Create test11.yml
shrutiburman Jul 24, 2026
43188ea
Delete .github/workflows/test11.yml
shrutiburman Jul 24, 2026
c5e879f
add workflow templates
shrutiburman Jul 24, 2026
8e68177
Merge branch 'dummy-gated-release' of https://github.com/twilio/twili…
shrutiburman Jul 24, 2026
a01b3ba
Merge branch 'main' of https://github.com/twilio/twilio-python
shrutiburman Jul 24, 2026
2243f60
workflow dispatcher
shrutiburman Jul 24, 2026
0c6eb88
Merge branch 'main' into dummy-gated-release
shrutiburman Jul 24, 2026
c56c9fd
updates
shrutiburman Jul 24, 2026
0e23f19
Update pre-release-check.yml
shrutiburman Jul 27, 2026
bcec6f1
Create release-plan.md
shrutiburman Jul 28, 2026
21b20d3
Merge branch 'main' of https://github.com/twilio/twilio-python into d…
shrutiburman Jul 28, 2026
642d7f3
Delete test-release.yml
shrutiburman Jul 28, 2026
920a59e
Create test-release.yml
shrutiburman Jul 28, 2026
ccfcfa3
updates
shrutiburman Jul 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 0 additions & 70 deletions .github/artifactory-oidc/action.yml

This file was deleted.

135 changes: 135 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: CI

on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
inputs:
python-version:
description: "Python version to test with (or 'all' for full matrix)"
required: false
default: "all"
schedule:
- cron: '30 3 * * 1' # Monday 9AM IST

env:
ARTIFACTORY_URL: ${{ vars.ARTIFACTORY_URL }}

jobs:
lockfile-hygiene:
runs-on: ubuntu-x64
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: twilio/sdk-actions/uv-lockfile-hygiene@23b656b843d2a3461cf38e4fd466c07a822d5fc0 # v1
with:
clean-room: 'false'

test:
name: Test - Python ${{ matrix.python-version }}
needs: [lockfile-hygiene]
runs-on: ubuntu-x64
if: github.repository_owner == 'twilio'
# make docs takes ~15mins
timeout-minutes: 30
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
python-version: ${{ (github.event_name == 'schedule' || github.event.inputs.python-version == 'all') && fromJson('["3.8","3.9","3.10","3.11","3.12","3.13"]') || fromJson(format('["{0}"]', github.event.inputs.python-version || '3.12')) }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0

- name: Artifactory OIDC Auth
uses: twilio/sdk-actions/artifactory-oidc@23b656b843d2a3461cf38e4fd466c07a822d5fc0 # v1
with:
ecosystem: python

- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install virtualenv --upgrade
make install test-install
make prettier

- name: Run tests
run: make test-with-coverage

- name: Run cluster tests
if: ${{ !github.event.pull_request.head.repo.fork }}
env:
TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
TWILIO_API_KEY: ${{ secrets.TWILIO_CLUSTER_TEST_API_KEY }}
TWILIO_API_SECRET: ${{ secrets.TWILIO_CLUSTER_TEST_API_KEY_SECRET }}
TWILIO_FROM_NUMBER: ${{ secrets.TWILIO_FROM_NUMBER }}
TWILIO_TO_NUMBER: ${{ secrets.TWILIO_TO_NUMBER }}
TWILIO_AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }}
ASSISTANT_ID: ${{ secrets.ASSISTANT_ID }}
run: make cluster-test

- name: Verify docs generation
run: make docs

deploy-dry-run:
name: Release Readiness Check - Build artifact
needs: [test]
runs-on: ubuntu-x64
if: github.repository_owner == 'twilio' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Artifactory OIDC Auth
uses: twilio/sdk-actions/artifactory-oidc@23b656b843d2a3461cf38e4fd466c07a822d5fc0 # v1
with:
ecosystem: python

- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"

- name: Install setuptools
run: pip install setuptools

- name: Validate version format
run: |
PKG_VERSION=$(python setup.py --version)
echo "Package version: $PKG_VERSION"
echo "PKG_VERSION=$PKG_VERSION" >> "$GITHUB_ENV"
if [[ ! "$PKG_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+ ]]; then
echo "::error::setup.py version must follow semver (got '$PKG_VERSION')"
exit 1
fi

- name: Build package
run: |
pip install build
python -m build

- name: Verify package
run: |
pip install twine
twine check dist/*

- name: List built artifacts
run: |
echo "Built artifacts:"
ls -lh dist/
echo ""
echo "Package version: $PKG_VERSION"

- name: Dry run summary
run: |
echo "--- DRY RUN COMPLETE ---"
echo "All pre-release steps passed for version $PKG_VERSION"

117 changes: 117 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Twilio Public release-pypi

on:
push:
tags:
- 'v*'

env:
ARTIFACTORY_URL: ${{ vars.ARTIFACTORY_URL }}

jobs:
lockfile-hygiene:
runs-on: ubuntu-x64
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: twilio/sdk-actions/uv-lockfile-hygiene@23b656b843d2a3461cf38e4fd466c07a822d5fc0 # v1
with:
clean-room: 'false'

test:
name: Test - Python ${{ matrix.python-version }}
needs: [lockfile-hygiene]
runs-on: ubuntu-x64
if: github.repository_owner == 'twilio'
timeout-minutes: 20
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0

- name: Artifactory OIDC Auth
uses: twilio/sdk-actions/artifactory-oidc@23b656b843d2a3461cf38e4fd466c07a822d5fc0 # v1
with:
ecosystem: python

- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install virtualenv --upgrade
make install test-install
make prettier

- name: Run tests
run: make test-with-coverage

deploy:
name: Publish to PyPI
needs: [test]
runs-on: ubuntu-x64
if: success() && github.ref_type == 'tag' && github.repository_owner == 'twilio'
environment: production
permissions:
contents: write # required for creating GitHub Release
id-token: write
attestations: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create "${{ github.ref_name }}" --generate-notes
Comment thread
shrutiburman marked this conversation as resolved.
Comment thread
shrutiburman marked this conversation as resolved.

- name: Artifactory OIDC Auth
uses: twilio/sdk-actions/artifactory-oidc@23b656b843d2a3461cf38e4fd466c07a822d5fc0 # v1
with:
ecosystem: python

- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"

- name: Install setuptools
run: pip install setuptools

- name: Validate tag format and version match
run: |
TAG="${GITHUB_REF#refs/tags/}"
if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
echo "::error::Release tag must be in the form v1.2.3 (got '$TAG')"
exit 1
fi
VERSION="${TAG#v}"
PKG_VERSION=$(python setup.py --version)
echo "Package version: $PKG_VERSION"
echo "PKG_VERSION=$PKG_VERSION" >> "$GITHUB_ENV"
if [ "$VERSION" != "$PKG_VERSION" ]; then
echo "::error::Tag $TAG does not match setup.py version $PKG_VERSION"
exit 1
fi

- name: Build package
run: |
pip install build
python -m build

- name: Verify package
run: |
pip install twine
twine check dist/*

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1

- name: Summary
run: |
echo "Published version $PKG_VERSION to PyPI"
3 changes: 0 additions & 3 deletions .github/workflows/test-release.yml

This file was deleted.

Loading
Loading