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 releases #57

Open
AlecThomson opened this issue Jul 10, 2024 · 5 comments · May be fixed by #60
Open

PyPI releases #57

AlecThomson opened this issue Jul 10, 2024 · 5 comments · May be fixed by #60

Comments

@AlecThomson
Copy link
Contributor

Hi @maaijke @gmloose ,

With the recent changes going into RMextract, will there be new releases onto PyPI? The last release is from 2021 it seems.

It may be neat to setup some CI/CD tools to automatically release new versions onto PyPI, if desired. I can help to get those implemented if that'd be useful.

@gmloose
Copy link
Collaborator

gmloose commented Jul 10, 2024

That is definitely the intention, yes. I leave it to @maaijke to decide when she thinks it's the proper time to do so. Some extra hands to help with automation would be welcomed very much. I sometimes struggle to find the time 😄.

@maaijke
Copy link
Collaborator

maaijke commented Jul 10, 2024

Yesy please make a new version @gmloose I understand that the master is used in Linc so it should be fine. I hope to start soon on a complete rewrite of RMextract I will contact you @AlecThomson when I am ready

@gmloose
Copy link
Collaborator

gmloose commented Jul 10, 2024

OK, I've put it on the top of my to-do list.

@AlecThomson
Copy link
Contributor Author

AlecThomson commented Jul 11, 2024

EDIT: I now have a better understanding of dynamic versioning, am changing this comment completely.

We can use the GitHub action like pypi-publish to publish to PyPI automatically.

I've recently been using config like this (note this uses a poetry build, which won't apply here)

name: Python package
on:
  push:
    tags:
      - "v*.*.*"
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Build and publish to pypi
        uses: JRubics/[email protected]
        with:
          pypi_token: ${{ secrets.PYPI_TOKEN }}

Which triggers when a release with the tag "v*.*.*" is made.

Let me know what you think and I can start a PR :)

It looks like the best option will be to follow this guide:
https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

@AlecThomson AlecThomson linked a pull request Jul 11, 2024 that will close this issue
@gmloose
Copy link
Collaborator

gmloose commented Jul 11, 2024

I've done this in the past. Here are two examples to get you going; they take slightly different approaches:

Both use automatic versioning using setuptool_scm and cibuildwheel for building portable binary wheels.

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