Skip to content

Commit

Permalink
ci: πŸ‘· trusted publisher configuration added
Browse files Browse the repository at this point in the history
Signed-off-by: Onuralp SEZER <[email protected]>
  • Loading branch information
onuralpszr committed Sep 27, 2024
1 parent 787bbda commit 31a3cca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/publish-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Supervision Test Releases to PyPi
name: Publish Supervision Pre-Releases to PyPI and TestPyPI
on:
push:
tags:
Expand All @@ -9,9 +9,11 @@ on:
workflow_dispatch:

jobs:
build-n-publish:
build-and-publish-pre-release-pypi:
name: Build and publish to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
strategy:
matrix:
python-version: ["3.10"]
Expand All @@ -30,12 +32,11 @@ jobs:
python -m pip install --upgrade build twine
python -m build
twine check --strict dist/*
- name: πŸš€ Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1.10
with:
password: ${{ secrets.PYPI_API_TOKEN }}

- name: πŸš€ Publish to Test-PyPi
uses: pypa/gh-action-pypi-publish@release/v1.10
with:
repository-url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
11 changes: 6 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Supervision Releases to PyPi
name: Publish Supervision Releases to PyPI and TestPyPI
on:
push:
tags:
Expand All @@ -7,8 +7,10 @@ on:
workflow_dispatch:

jobs:
build:
build-and-publish-pre-release:
runs-on: ubuntu-latest
permissions:
id-token: write
strategy:
matrix:
python-version: ["3.10"]
Expand All @@ -27,12 +29,11 @@ jobs:
python -m pip install --upgrade build twine
python -m build
twine check --strict dist/*
- name: πŸš€ Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1.10
with:
password: ${{ secrets.PYPI_API_TOKEN }}

- name: πŸš€ Publish to Test-PyPi
uses: pypa/gh-action-pypi-publish@release/v1.10
with:
repository-url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_API_TOKEN }}

0 comments on commit 31a3cca

Please sign in to comment.