Skip to content

Release sdk-v2.0.1

Release sdk-v2.0.1 #21

Workflow file for this run

# This workflow will upload Python Packages to PyPI when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Upload PyPI Package
on:
release:
types: [published]
permissions:
contents: read
jobs:
release-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- name: aws-durable-execution-sdk-python
path: packages/aws-durable-execution-sdk-python
- name: aws-durable-execution-sdk-python-otel
path: packages/aws-durable-execution-sdk-python-otel
- name: aws-durable-execution-sdk-python-testing
path: packages/aws-durable-execution-sdk-python-testing
- name: aws-durable-execution-sdk-python-insight
path: packages/aws-durable-execution-sdk-python-insight
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.release.tag_name }}
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"
- name: Install Hatch
run: python -m pip install --upgrade hatch==1.16.5
- name: Build release distributions
working-directory: ${{ matrix.package.path }}
run: hatch build
- name: Verify legal files in release distributions
run: python .github/scripts/check_dist_legal_files.py ${{ matrix.package.path }}
- name: Upload distributions
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: release-dists-${{ matrix.package.name }}
path: ${{ matrix.package.path }}/dist/
pypi-publish:
runs-on: ubuntu-latest
needs:
- release-build
strategy:
fail-fast: false
matrix:
package:
- name: aws-durable-execution-sdk-python
- name: aws-durable-execution-sdk-python-otel
- name: aws-durable-execution-sdk-python-testing
- name: aws-durable-execution-sdk-python-insight
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/project/${{ matrix.package.name }}/${{ github.event.release.name }}
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: release-dists-${{ matrix.package.name }}
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
with:
packages-dir: dist/