Skip to content

Commit

Permalink
Merge pull request #313 from sandialabs/kuberry-gh-action-version
Browse files Browse the repository at this point in the history
Update pycompadre_sdist.yml to use trusted publisher management
  • Loading branch information
kuberry authored Dec 5, 2024
2 parents 7fedb9d + a9959d0 commit 339f587
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions .github/workflows/pycompadre_sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
pycompadre-type: [ 'pycompadre', 'pycompadre-serial', ]
pycompadre-type: [ 'pycompadre',]
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -85,27 +85,34 @@ jobs:
if: ${{ github.event.inputs.publish == 'y'}}
strategy:
matrix:
pycompadre-type: [ 'pycompadre', 'pycompadre-serial', ]
pycompadre-type: [ 'pycompadre',]
environment:
name: pypi
url: https://pypi.org/p/<package-name> # Replace <package-name> with your PyPI project name
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v4.1.7
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: ${{matrix.pycompadre-type}}.tar.gz
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
## https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
#- name: Publish distribution 📦 to Test PyPI
# uses: pypa/gh-action-pypi-publish@master
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.TEST_PIP_PYCOMPADRE_SECRET }}
# repository_url: https://test.pypi.org/legacy/

# repository_url: https://test.pypi.org/legacy/
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
- name: Publish distribution 📦 to PyPI (parallel)
if: ${{ matrix.pycompadre-type == 'pycompadre' }}
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PIP_PYCOMPADRE_SECRET }}
- name: Publish distribution 📦 to PyPI (serial)
if: ${{ matrix.pycompadre-type == 'pycompadre-serial' }}
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PIP_PYCOMPADRE_SERIAL_SECRET }}
#- name: Publish distribution 📦 to PyPI (parallel)
# if: ${{ matrix.pycompadre-type == 'pycompadre' }}
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.PIP_PYCOMPADRE_SECRET }}
#- name: Publish distribution 📦 to PyPI (serial)
# if: ${{ matrix.pycompadre-type == 'pycompadre-serial' }}
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.PIP_PYCOMPADRE_SERIAL_SECRET }}

0 comments on commit 339f587

Please sign in to comment.