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

PyPI / pip installation #3

Open
DrShushen opened this issue Oct 20, 2023 · 4 comments
Open

PyPI / pip installation #3

DrShushen opened this issue Oct 20, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@DrShushen
Copy link

I find this extension very useful, but it seems there isn't a PyPI (pip) installation at the moment? Would be great to have that for ease of use.

@picnixz
Copy link
Owner

picnixz commented Oct 22, 2023

Oh yes. Actually I never released things on PyPI so I don't really know how to do it. Unfortunately, I don't have much time until next year due to my PhD thesis so I won't be able to make a release for that soon.

I will try to find some time for that but I cannot guarantee anything :(

@picnixz picnixz added the enhancement New feature or request label Oct 22, 2023
@picnixz picnixz self-assigned this Oct 22, 2023
@DrShushen
Copy link
Author

Haha, I am also doing a PhD. I think I will be able to help you with this, as I have released projects on PyPI before. Are you happy for me to submit a PR with the changes at some point soon?

@picnixz
Copy link
Owner

picnixz commented Nov 7, 2023

I would be happy but I don't know whether I'll have time to look at it!

@flying-sheep
Copy link

flying-sheep commented Jan 22, 2024

It’s pretty easy actually.

Step 0: create a pypi account, set up 2FA, …

Then:

  1. create an GitHub environment for this project called pypi or release or so

  2. create .github/workflows/publish.yml or …/release.yml or so:

    jobs:
      pypi-publish:
        name: Upload release to PyPI
        runs-on: ubuntu-latest
        environment:
          name: pypi
          url: https://pypi.org/p/sphinx-zeta-suppress
        permissions:
          id-token: write  # IMPORTANT: this permission is mandatory for trusted publishing
        steps:
        - uses: actions/checkout@v4
        - uses: actions/setup-python@v4
          with:
            python-version: "3.x"
            cache: pip
        - run: pip install build
        - run: python -m build
        - name: Publish package distributions to PyPI
          uses: pypa/gh-action-pypi-publish@release/v1
  3. fill out a single form with the file name and env name you chose

  4. create a release using the GitHub UI

repeat step 1-4 for each project, and step 5 for each release

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

No branches or pull requests

3 participants