This repository has been archived by the owner on Oct 24, 2024. It is now read-only.
feat: Add pypi publish workflow for autopilot-utils #5
This file contains 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
name: Create Github release and tag | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- autopilots-utils-pypi-publish | |
jobs: | |
build-package: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Setup pants | |
uses: pantsbuild/actions/init-pants@v8 | |
with: | |
gha-cache-key: cache0 | |
named-caches-hash: ${{ hashFiles('3rdparty/*.txt') }} | |
- name: Build wheel | |
run: | | |
pants package packages/autopilot-utils/:: | |
- name: Store the distribution packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: autopilot-utils-package-distributions | |
path: dist/*.whl | |
publish-to-pypi: | |
runs-on: ubuntu-latest | |
needs: [build-package] | |
env: | |
name: pypi | |
url: https://pypi.org/p/autopilot-utils | |
permissions: | |
id-token: write | |
steps: | |
- name: Download distribution packages | |
uses: actions/download-artifact@v4 | |
with: | |
name: autopilot-utils-package-distributions | |
path: dist/ | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
verify-metadata: false | |