Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create PyPi release #222

Open
cwschilly opened this issue Jul 22, 2024 · 2 comments · May be fixed by #233
Open

Create PyPi release #222

cwschilly opened this issue Jul 22, 2024 · 2 comments · May be fixed by #233
Assignees

Comments

@cwschilly
Copy link
Collaborator

cwschilly commented Jul 22, 2024

@fnrizzi @eparish1

The build process for the demos repo could be simplified if we push a version of romtools to PyPi (like we did in pressio-linalg, here).

This would allow users to install the library with:

pip install romtools

And in the demos repo, we could then list romtools in the build_requirements.txt file and avoid having to git clone this repo.

@eparish1
Copy link
Contributor

This would be great, thanks! If you and Francesco can take care of this that's great; if not I'll look into it sometime next week.

@cwschilly cwschilly self-assigned this Jul 23, 2024
@fnrizzi
Copy link
Member

fnrizzi commented Sep 2, 2024

this is what we used in the CI for pressio-linalg that does not exist anymore, just pasting it here not to lose it.

name: Publish Python package to PyPi

on: push

jobs:
  build-and-publish:
    name: Build and publish Python Package to PyPi
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Set up Python 3.11
        uses: actions/setup-python@v4
        with:
          python-version: 3.11
      - name: Install build
        run: |
          python -m pip install build --user
      - name: Build a binary wheel and a source tarball
        run: |
          python -m build --sdist --wheel --outdir dist/ .
      - name: Publish package
        if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
        uses: pypa/gh-action-pypi-publish@release/v1
        with:
          user: __token__
          password: ${{ secrets.PYPI_API_TOKEN }}
          verbose: true
          print-hash: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants