Added dependency on pycairo in an attempt to simplify installation on… #21
This file contains 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
name: Updates version and tags | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
update_version_and_tag: | |
runs-on: ubuntu-latest | |
if: "!startsWith(github.event.head_commit.message, '[SKIP]')" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Python 3 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Setup env variables | |
run: | | |
echo "SKIPBUMP=FALSE" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install bump-my-version setuptools wheel twine | |
- name: Configure git | |
run: | | |
git config --global user.name 'PartCAD GitHub Action' | |
git config --global user.email '[email protected]' | |
# If a commit starts with [MAJOR] a new major verion upgrade will be | |
# triggered. Use with caution as Major upgrades denote backwards | |
# incompatibility. Yet I like it to be integrated in the CI | |
- name: Bump Major Version | |
env: | |
COMMIT_MSG: ${{ github.event.head_commit.message }} | |
run: | | |
bump-my-version bump major | |
echo "SKIPBUMP=TRUE" >> $GITHUB_ENV | |
if: startsWith(github.event.head_commit.message, '[MAJOR]') | |
- name: Bump Minor Version | |
env: | |
COMMIT_MSG: ${{ github.event.head_commit.message }} | |
run: | | |
bump-my-version bump minor | |
echo "SKIPBUMP=TRUE" >> $GITHUB_ENV | |
if: startsWith(github.event.head_commit.message, '[FEATURE]') | |
# Default action | |
- name: Bump Patch Version | |
env: | |
COMMIT_MSG: ${{ github.event.head_commit.message }} | |
run: | | |
bump-my-version bump patch | |
if: env.SKIPBUMP == 'FALSE' | |
- name: Commit version change to master | |
run: | | |
git push --force --follow-tags | |
# TODO(clairbee): publish the package as seen in https://github.com/joaomcteixeira/python-project-skeleton/blob/main/.github/workflows/version-bump-and-package.yml |