Update package version #187
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Workflow that runs on versioning metadata updates. | |
| name: Versioning updates | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - changelog.d/** | |
| - "!pyproject.toml" | |
| jobs: | |
| Versioning: | |
| runs-on: ubuntu-latest | |
| if: | | |
| (!(github.event.head_commit.message == 'Update package version')) | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.POLICYENGINE_GITHUB }} | |
| fetch-depth: 0 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12 | |
| - name: Install towncrier | |
| run: pip install towncrier | |
| - name: Bump version and build changelog | |
| run: | | |
| python .github/bump_version.py | |
| towncrier build --yes --version $(python -c "import re; print(re.search(r'version = \"(.+?)\"', open('pyproject.toml').read()).group(1))") | |
| - name: Update changelog | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| add: "." | |
| message: Update package version |