-
Notifications
You must be signed in to change notification settings - Fork 808
updates to release process #941
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
Open
shrutiburman
wants to merge
37
commits into
main
Choose a base branch
from
dummy-gated-release
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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 91a4751
add a test workflow
shrutiburman 8741919
Apply suggestion from @semgrep-code-twilio[bot]
shrutiburman e4e70c6
add a test workflow
shrutiburman 61e0cdd
Update runner conditions for GitHub Actions workflow
shrutiburman 180114f
Change runs-on to 'ubuntu-x64' in workflows
shrutiburman 5becd71
updates
shrutiburman 2f2060b
Comment out aiohttp dependency to try out
shrutiburman ce4d5f4
Comment out aiohttp-retry dependency
shrutiburman b86c974
test push from token locally
shrutiburman ba4246c
test the pat from local testing
twilio-dx d62ff0e
test dummy commit from Librarian pod ssh
twilio-dx 7b1183c
test librarian ssh cmd
twilio-dx a95dc7e
test push
twilio-dx d713fee
push from librarian
twilio-dx 4f109d3
prettify
twilio-dx 25d4e59
prettify
twilio-dx 0517180
Update test-release.yml
shrutiburman 30f1c34
Update deploy.yml
shrutiburman 56d4bb9
move the workflow to correct folder
shrutiburman 2396bcf
add workflow templates
shrutiburman e9c8690
add workflow templates and RC tag
shrutiburman 7ce4e76
update sha
shrutiburman 30aecdb
Create test11.yml
shrutiburman 43188ea
Delete .github/workflows/test11.yml
shrutiburman c5e879f
add workflow templates
shrutiburman 8e68177
Merge branch 'dummy-gated-release' of https://github.com/twilio/twili…
shrutiburman a01b3ba
Merge branch 'main' of https://github.com/twilio/twilio-python
shrutiburman 2243f60
workflow dispatcher
shrutiburman 0c6eb88
Merge branch 'main' into dummy-gated-release
shrutiburman c56c9fd
updates
shrutiburman 0e23f19
Update pre-release-check.yml
shrutiburman bcec6f1
Create release-plan.md
shrutiburman 21b20d3
Merge branch 'main' of https://github.com/twilio/twilio-python into d…
shrutiburman 642d7f3
Delete test-release.yml
shrutiburman 920a59e
Create test-release.yml
shrutiburman ccfcfa3
updates
shrutiburman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
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" | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.