diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-04 13:35:26 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-04 13:35:26 +0000 |
commit | 5069b276b4fe73f956de28531beb6faca145b6f1 (patch) | |
tree | bebc7f49ccd7ba91e9a451cee80a74a6a36dc842 /.github/workflows/pypi-publish.yml | |
parent | 7b05fcaf11d10abc335317ffcabdf13ea10c31db (diff) | |
parent | 9f63580afeb5226b243a8faeadec7ea05555833e (diff) | |
download | bt-test-interfaces-5069b276b4fe73f956de28531beb6faca145b6f1.tar.gz |
Snap for 11173240 from 9f63580afeb5226b243a8faeadec7ea05555833e to mainline-sdkext-releaseaml_sdk_341710000aml_sdk_341510000aml_sdk_341410000android14-mainline-sdkext-release
Change-Id: Ie0c642f99e27b6ea088775c60df49ca77423ef8d
Diffstat (limited to '.github/workflows/pypi-publish.yml')
-rw-r--r-- | .github/workflows/pypi-publish.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml new file mode 100644 index 0000000..2432c3e --- /dev/null +++ b/.github/workflows/pypi-publish.yml @@ -0,0 +1,38 @@ +name: PyPI Publish + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI + runs-on: ubuntu-latest + + steps: + - name: Check out from Git + uses: actions/checkout@v3 + - name: Get history and tags for SCM versioning to work + run: | + git fetch --prune --unshallow + git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install build + - name: Build package + run: python -m build python/ + - name: Publish package to PyPI + if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: python/dist/ + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} |