Skip to content

Commit

Permalink
Used trusted publisher for PyPi (backport #88) (#134)
Browse files Browse the repository at this point in the history
Co-authored-by: Steve Wood <[email protected]>
  • Loading branch information
mergify[bot] and woodsp-ibm authored Jan 19, 2024
1 parent 9ccfcde commit 07f14e3
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/deploy-code.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2021, 2022.
# (C) Copyright IBM 2021, 2023.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand All @@ -20,6 +20,9 @@ on:
jobs:
code_publish:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
strategy:
matrix:
python-version: [3.8]
Expand All @@ -28,12 +31,12 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install deps
run: pip install -U pip setuptools virtualenv wheel
- name: Build sdist
run: python3 setup.py sdist bdist_wheel
- uses: actions/upload-artifact@v3
with:
path: ./dist/*
- name: Deploy to Pypi
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: qiskit
run : |
pip install -U twine pip setuptools virtualenv wheel
python3 setup.py sdist bdist_wheel
twine upload dist/qiskit*
shell: bash
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 07f14e3

Please sign in to comment.