Skip to content

Commit 1860fdb

Browse files
authored
Merge pull request #1542 from roboflow/ci/pypi-configs
ci: πŸ‘· pypi username - password swap with token
2 parents b45bee0 + 31a3cca commit 1860fdb

File tree

2 files changed

+17
-19
lines changed

2 files changed

+17
-19
lines changed

β€Ž.github/workflows/publish-test.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Supervision Test Releases to PyPi
1+
name: Publish Supervision Pre-Releases to PyPI and TestPyPI
22
on:
33
push:
44
tags:
@@ -9,9 +9,11 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12-
build-n-publish:
12+
build-and-publish-pre-release-pypi:
1313
name: Build and publish to PyPI
1414
runs-on: ubuntu-latest
15+
permissions:
16+
id-token: write
1517
strategy:
1618
matrix:
1719
python-version: ["3.10"]
@@ -30,14 +32,11 @@ jobs:
3032
python -m pip install --upgrade build twine
3133
python -m build
3234
twine check --strict dist/*
33-
- name: πŸš€ Publish distribution to PyPI
34-
uses: pypa/gh-action-pypi-publish@release/v1
35-
with:
36-
user: ${{ secrets.PYPI_USERNAME }}
37-
password: ${{ secrets.PYPI_PASSWORD }}
35+
36+
- name: πŸš€ Publish to PyPi
37+
uses: pypa/gh-action-pypi-publish@release/v1.10
38+
3839
- name: πŸš€ Publish to Test-PyPi
39-
uses: pypa/gh-action-pypi-publish@release/v1
40+
uses: pypa/gh-action-pypi-publish@release/v1.10
4041
with:
4142
repository-url: https://test.pypi.org/legacy/
42-
user: ${{ secrets.PYPI_TEST_USERNAME }}
43-
password: ${{ secrets.PYPI_TEST_PASSWORD }}

β€Ž.github/workflows/publish.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Supervision Releases to PyPi
1+
name: Publish Supervision Releases to PyPI and TestPyPI
22
on:
33
push:
44
tags:
@@ -7,8 +7,10 @@ on:
77
workflow_dispatch:
88

99
jobs:
10-
build:
10+
build-and-publish-pre-release:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
id-token: write
1214
strategy:
1315
matrix:
1416
python-version: ["3.10"]
@@ -27,14 +29,11 @@ jobs:
2729
python -m pip install --upgrade build twine
2830
python -m build
2931
twine check --strict dist/*
32+
3033
- name: πŸš€ Publish to PyPi
31-
uses: pypa/gh-action-pypi-publish@release/v1
32-
with:
33-
user: ${{ secrets.PYPI_USERNAME }}
34-
password: ${{ secrets.PYPI_PASSWORD }}
34+
uses: pypa/gh-action-pypi-publish@release/v1.10
35+
3536
- name: πŸš€ Publish to Test-PyPi
36-
uses: pypa/gh-action-pypi-publish@release/v1
37+
uses: pypa/gh-action-pypi-publish@release/v1.10
3738
with:
3839
repository-url: https://test.pypi.org/legacy/
39-
user: ${{ secrets.PYPI_TEST_USERNAME }}
40-
password: ${{ secrets.PYPI_TEST_PASSWORD }}

0 commit comments

Comments
Β (0)