Skip to content

Commit

Permalink
Fix workflow and tag release.
Browse files Browse the repository at this point in the history
  • Loading branch information
fdmalone committed Dec 12, 2023
1 parent ca75d82 commit 0abe346
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
tags:
- v*

jobs:
build:
Expand Down Expand Up @@ -56,23 +57,21 @@ jobs:
python3 examples/03-custom_observable/run_afqmc.py
publish-to-pypi:
name: >-
name:
Publish Python distribution to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
if: github.ref == 'refs/head/main'
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/ipie
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
packages_dir: dist/
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 0abe346

Please sign in to comment.