Add environment to publish.yml, publish-test.yml

* Similar issue: https://github.com/pypa/gh-action-pypi-publish/issues/217#issuecomment-1965733177
* Minor stylistic edits to the file
This commit is contained in:
LinasKo 2024-11-06 15:35:49 +02:00
parent 17f482b1ba
commit e1af717c59
2 changed files with 7 additions and 5 deletions

View File

@ -2,9 +2,9 @@ name: Publish Supervision Pre-Releases to PyPI and TestPyPI
on:
push:
tags:
- '[0-9]+.[0-9]+[0-9]+.[0-9]+a[0-9]'
- '[0-9]+.[0-9]+[0-9]+.[0-9]+b[0-9]'
- '[0-9]+.[0-9]+[0-9]+.[0-9]+rc[0-9]'
- "[0-9]+.[0-9]+[0-9]+.[0-9]+a[0-9]"
- "[0-9]+.[0-9]+[0-9]+.[0-9]+b[0-9]"
- "[0-9]+.[0-9]+[0-9]+.[0-9]+rc[0-9]"
workflow_dispatch:
@ -12,6 +12,7 @@ jobs:
build-and-publish-pre-release-pypi:
name: Build and publish to PyPI
runs-on: ubuntu-latest
environment: test
permissions:
id-token: write
strategy:

View File

@ -2,13 +2,14 @@ name: Publish Supervision Releases to PyPI and TestPyPI
on:
push:
tags:
- '[0-9]+.[0-9]+[0-9]+.[0-9]'
- "[0-9]+.[0-9]+[0-9]+.[0-9]"
workflow_dispatch:
jobs:
build-and-publish-pre-release:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
strategy:
@ -24,7 +25,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: 🏗️ Build source and wheel distributions
- name: 🏗️ Build source and wheel distributions
run: |
python -m pip install --upgrade build twine
python -m build