Skip to content

Commit

Permalink
Merge pull request #36 from robinzyb/robinzyb-patch-1
Browse files Browse the repository at this point in the history
Update pub-pypi.yml
  • Loading branch information
robinzyb authored Jan 2, 2024
2 parents 2968cdf + d82c26e commit 5bba75a
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/pub-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name: Publish Python distributions to PyPI

on: push
on: [push]

jobs:
build-n-publish:
if: github.repository_owner == 'robinzyb'
name: Build and publish Python distributions to PyPI
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/cp2kdata
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
# retrieve your distributions here
- uses: actions/checkout@master

- name: Set up Python 3.9
Expand All @@ -30,9 +35,7 @@ jobs:
--wheel
--outdir dist/
.
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish package distributions to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 5bba75a

Please sign in to comment.