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

Add python support #129

Open
shaunc opened this issue Feb 9, 2022 · 2 comments
Open

Add python support #129

shaunc opened this issue Feb 9, 2022 · 2 comments

Comments

@shaunc
Copy link

shaunc commented Feb 9, 2022

I'm wondering if I can use this for a python project on gitlab.

I like this project because of how lightweight it is, supports gitlab, and support pre-releases, which the current python-semantic-release doesn't (among a few other glitches I had using it). I've used the original semantic-release before, but AFAIK I'd have to use yarn/npm tooling in addition to poetry, which seems unnecessary if I can avoid it.

I suppose I would need to add pyproject.toml version support. The doc doesn't say anything about adding custom plugins. Does the .semrelrc support them? Any other thoughts?

@christophwitzko
Copy link
Member

Hi @shaunc, at the moment we only have support for npm packages and helm charts. I am happy to add support for poetry.
You can enable plugins using command line flags or the .semrelrc config file.

@kiran94
Copy link

kiran94 commented May 21, 2023

I wanted to share that I was able leverage this GitHub action + Poetry using what is already available. Here is what I have:

      - uses: actions/checkout@v3
      - uses: abatilo/actions-poetry@v2

      # Perform a Release (note the id being assigned below) 
      - name: Release
        id: release
        uses: go-semantic-release/action@v1
        if: github.ref == 'refs/heads/main'
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          allow-initial-development-versions: true
      
      # Bump Poetry Version with the output from the release step
      - name: Bump Poetry
        if: github.ref == 'refs/heads/main' && steps.release.outputs.version != ''
        run: poetry version ${{ steps.release.outputs.version }}
      
      # Commit the version bump back to main branch
      - uses: EndBug/add-and-commit@v9
        if: github.ref == 'refs/heads/main' && steps.release.outputs.version != ''
        with:
          message: "chore(version): bump"
          default_author: github_actions
          add: pyproject.toml

You can then ofcourse do a poetry publish if you need. Hope this helps!

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

No branches or pull requests

3 participants