Skip to content

Commit b4d7d57

Browse files
committed
[ghaction] Synchronize publish-to-pypi.yml with app4triqs
1 parent cb76f53 commit b4d7d57

1 file changed

Lines changed: 12 additions & 19 deletions

File tree

.github/workflows/publish-to-pypi.yml

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,25 @@ jobs:
1111
name: Build distribution 📦
1212
runs-on: ubuntu-latest
1313
container: # we have to provide a working triqs installation to make the cmake step work
14-
image: flatironinstitute/triqs:${{github.ref_name}}
14+
image: flatironinstitute/triqs:latest
15+
options: --user root
1516

1617
steps:
17-
- uses: actions/checkout@v4
18-
- name: Set up Python
19-
uses: actions/setup-python@v4
20-
with:
21-
python-version: "3.x"
18+
- uses: actions/checkout@v7
2219
- name: Install pypa/build
23-
run: >-
24-
python3 -m
25-
pip install
26-
build toml
27-
--user
20+
run: |
21+
pip3 install --user build toml --break-system-packages
2822
- name: prepare python distribution
2923
run: |
30-
mkdir build && cd build
31-
cmake ../
32-
cp packaging/pypi/* ../
33-
mv python/omegamaxent_interface/version.py ../python/omegamaxent_interface/version.py
34-
rm ../python/omegamaxent_interface/version.py.in
24+
git config --global --add safe.directory ${GITHUB_WORKSPACE}
25+
cmake -S . -B build/
26+
cp build/packaging/pypi/* ./
27+
mv build/python/omegamaxent_interface/version.py ./python/omegamaxent_interface/version.py
28+
rm ./python/omegamaxent_interface/version.py.in
3529
- name: Build a binary wheel and a source tarball
3630
run: python3 -m build
3731
- name: Store the distribution packages
38-
uses: actions/upload-artifact@v3
32+
uses: actions/upload-artifact@v7
3933
with:
4034
name: python-package-distributions
4135
path: dist/
@@ -53,12 +47,11 @@ jobs:
5347

5448
steps:
5549
- name: Download all the dists
56-
uses: actions/download-artifact@v3
50+
uses: actions/download-artifact@v8
5751
with:
5852
name: python-package-distributions
5953
path: dist/
6054
- name: Publish distribution 📦 to PyPI
6155
uses: pypa/gh-action-pypi-publish@release/v1
6256
with:
6357
skip-existing: true # skip if version name package already exists on pypi
64-

0 commit comments

Comments
 (0)