Skip to content

Commit 592385e

Browse files
Used trusted publisher for PyPi (#564)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent e620f08 commit 592385e

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/deploy-code.yml

+11-9
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ on:
2020
jobs:
2121
code_publish:
2222
runs-on: ubuntu-latest
23+
environment: release
24+
permissions:
25+
id-token: write
2326
strategy:
2427
matrix:
2528
python-version: [3.8]
@@ -28,13 +31,12 @@ jobs:
2831
- uses: actions/setup-python@v4
2932
with:
3033
python-version: ${{ matrix.python-version }}
34+
- name: Install deps
35+
run: pip install -U pip setuptools virtualenv wheel
36+
- name: Build sdist
37+
run: python3 setup.py sdist bdist_wheel
38+
- uses: actions/upload-artifact@v3
39+
with:
40+
path: ./dist/*
3141
- name: Deploy to Pypi
32-
env:
33-
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
34-
TWINE_USERNAME: qiskit
35-
run : |
36-
pip install -U twine pip setuptools virtualenv wheel
37-
python3 setup.py sdist bdist_wheel
38-
twine upload dist/qiskit*
39-
shell: bash
40-
42+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)