This GitHub Action automatically updates the pinned version of Pysigma in your pyproject.toml
file and handles semantic versioning. It ensures that your project always uses the latest compatible version of Pysigma, and only creates a new release if all tests pass.
- Make sure you have a
pyproject.toml
file with Poetry as your dependency manager. - Ensure your repository has a
tests
folder with test cases that validate your project.
dry_run
: Optional. Set totrue
to run the workflow without creating tags or releases. Default isfalse
.
To use this action, create a workflow file in your repository (e.g., .github/workflows/update-pysigma.yml
) with the following content:
name: Update Pysigma Version
on:
schedule:
- cron: '0 0 * * *' # Adjust the schedule as needed
workflow_dispatch:
jobs:
update_pysigma:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Use Update Pysigma Version action
uses: slincoln-aiq/pysigma-auto-update@v1
with:
dry_run: false
You can adjust the cron schedule to control how often the action runs. The workflow_dispatch trigger allows you to manually trigger the workflow from the GitHub Actions tab in your repository.
- Set up Python: Sets up a Python environment.
- Install Poetry: Installs Poetry for dependency management.
- Install dependencies: Installs all dependencies using Poetry.
- Run update script: Executes the script to check for and apply Pysigma version updates.
- Commit changes: Commits and pushes changes to pyproject.toml if updates were made.
- Run tests: Runs your project tests to ensure everything works with the new version.
- Determine new version tag: Calculates the new version tag based on the latest tag.
- Tag and push: Creates and pushes a new tag if all tests pass.
- Create GitHub release: Creates a new GitHub release using the new tag.
We welcome contributions! If you have suggestions for improvements or new features, feel free to open an issue or submit a pull request. Please make sure to follow our code of conduct.
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.