aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/python.yml
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2024-08-06 22:06:49 -0500
committerMatt Strapp <matt@mattstrapp.net>2024-08-06 22:06:49 -0500
commitd684f38fa9001c9e175aa649c0a0cc77c72f1dea (patch)
tree1f81856a6adec96c2fb4f795487ea314704b4589 /.github/workflows/python.yml
parentpython: Add Build as a dependency (diff)
downloadlocusts-d684f38fa9001c9e175aa649c0a0cc77c72f1dea.tar
locusts-d684f38fa9001c9e175aa649c0a0cc77c72f1dea.tar.gz
locusts-d684f38fa9001c9e175aa649c0a0cc77c72f1dea.tar.bz2
locusts-d684f38fa9001c9e175aa649c0a0cc77c72f1dea.tar.lz
locusts-d684f38fa9001c9e175aa649c0a0cc77c72f1dea.tar.xz
locusts-d684f38fa9001c9e175aa649c0a0cc77c72f1dea.tar.zst
locusts-d684f38fa9001c9e175aa649c0a0cc77c72f1dea.zip
chore: Update workflow names and descriptions for consistency
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to '.github/workflows/python.yml')
-rw-r--r--.github/workflows/python.yml26
1 files changed, 25 insertions, 1 deletions
diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
index ddb929b..f75c9d6 100644
--- a/.github/workflows/python.yml
+++ b/.github/workflows/python.yml
@@ -15,7 +15,8 @@ on:
- ".github/workflows/python.yml"
jobs:
- build:
+ build-and-test:
+ name: Build and Test (Python)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@@ -34,3 +35,26 @@ jobs:
run: python -m build
- name: Test
run: python -m unittest discover -s src/locusts-r-us
+
+ publish:
+ name: Publish to PyPI
+ needs: build-and-test
+ if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
+ runs-on: ubuntu-latest
+ permissions:
+ id-token: write
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.x"
+ - name: Install dependencies
+ run: python -m pip install -r requirements.txt
+ - name: Build the package
+ run: python -m build --sdist --wheel
+ - name: Publish package distributions to PyPI
+ uses: pypa/gh-action-pypi-publish@release/v1