generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 19
feat: Add Automated PyPI Publishing Workflow #83
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
Merged
+244
−1
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5ac5998
pypi release automation through github actions
b52085f
Forward region via meta (#71)
kyoncal d32cde8
docs: mention creating issues first before sending large PR with new …
wzxxing 0afc595
feat: allow iam mcp client to take a botocore credentials object (#84)
wzxxing 459de24
pypi release automation through github actions
cba9ca6
Merge branch 'aws:main' into release-actions
harv-aws 18d4e0a
chore: pypi publishing added to development.md
6d04180
chore: simplifying uv install
c65b56f
fix: adding input commit id for integ tests, and passing it in publis…
5ccf660
Merge branch 'main' into release-actions
arangatang 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 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,73 @@ | ||
| name: Publish to PyPI | ||
|
|
||
| on: | ||
| release: | ||
| types: | ||
| - published | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| call-test: | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| security-events: write | ||
| actions: read | ||
| uses: ./.github/workflows/python.yml | ||
harv-aws marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| with: | ||
| ref: ${{ github.event.release.target_commitish }} | ||
harv-aws marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| call-integ-tests: | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| actions: read | ||
| uses: ./.github/workflows/python-integ.yml | ||
| with: | ||
| ref: ${{ github.event.release.target_commitish }} | ||
| secrets: inherit | ||
|
|
||
| build: | ||
| needs: [call-test, call-integ-tests] | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@v4 | ||
|
|
||
| - name: Build distribution packages | ||
| run: uv build | ||
|
|
||
| - name: Upload distribution packages | ||
arangatang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: python-package-distributions | ||
| path: dist/ | ||
|
|
||
| deploy: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: pypi | ||
| url: https://pypi.org/p/mcp-proxy-for-aws | ||
| permissions: | ||
| id-token: write | ||
| steps: | ||
| - name: Download distribution packages | ||
| uses: actions/download-artifact@v5 | ||
| with: | ||
| name: python-package-distributions | ||
| path: dist/ | ||
|
|
||
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@v4 | ||
|
|
||
| - name: Publish to PyPI | ||
| run: uv publish | ||
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
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
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,71 @@ | ||
| name: Test PyPI Publishing | ||
harv-aws marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| call-test: | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| security-events: write | ||
| actions: read | ||
| with: | ||
| ref: ${{ github.event.release.target_commitish }} | ||
| uses: ./.github/workflows/python.yml | ||
|
|
||
| call-integ-tests: | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| actions: read | ||
| uses: ./.github/workflows/python-integ.yml | ||
| with: | ||
| ref: ${{ github.event.release.target_commitish }} | ||
| secrets: inherit | ||
|
|
||
| build: | ||
| needs: [call-test, call-integ-tests] | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@v4 | ||
|
|
||
| - name: Build distribution packages | ||
| run: uv build | ||
|
|
||
| - name: Upload distribution packages | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: python-package-distributions | ||
| path: dist/ | ||
|
|
||
| deploy-test: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: testpypi | ||
| url: https://test.pypi.org/p/mcp-proxy-for-aws | ||
| permissions: | ||
| id-token: write | ||
| steps: | ||
| - name: Download distribution packages | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: python-package-distributions | ||
| path: dist/ | ||
|
|
||
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@v4 | ||
|
|
||
| - name: Publish to TestPyPI | ||
| run: uv publish --publish-url https://test.pypi.org/legacy/ | ||
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
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.