lightly-ai / lightly-ai/labelformat
Add autorelease workflow
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 91
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
To simplify the release workflow we could create a GitHub action that automatically bumps the version and releases the package to PyPI. An example script could look like this:
```yaml
name: Deploy to PyPI
on:
workflow_dispatch:
inputs:
version-type:
description: 'Version bump type (major, minor, patch)'
required: true
default: 'patch'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Bump version
run: poetry version ${{ github.event.inputs.version-type }}
- name: Push changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -am "Increase version [skip ci]"
git push
- name: Publish to PyPI
run: poetry publish --build --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}
```
Note: With branch protection enabled we would need to find a way to enable the action committing directly to `main`. I think there's the option to exclude GitHub actions from branch protection rules or we could use a PAT.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the repository's current versioning and release configuration, then compare it with the proposed GitHub Actions workflow. The workflow should support a selectable major, minor, or patch bump, publish the package to PyPI, and handle the noted branch-protection and authentication requirements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, python
- Domain
- ci-cd, devops, release
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100