Added automated versioning

This commit is contained in:
2024-04-01 19:14:57 +02:00
parent 2e056d2289
commit 2a04426356
3 changed files with 66 additions and 3 deletions

View File

@@ -1,9 +1,8 @@
name: Lint
name: Lint and tag
on:
push:
branches:
- dev
- master
paths-ignore:
- "**/.github/**"
@@ -27,3 +26,21 @@ jobs:
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Adjusted files for isort & autopep
tag:
runs-on: ubuntu-latest
needs: lint
steps:
- name: Git Version
uses: codacy/git-version@2.8.0
id: git_version
with:
prefix: v
minor-identifier: "feat:"
major-identifier: "breaking:"
- name: Create Tag
run: git tag -a v${{ steps.git_version.outputs.version }} -m "v${{ steps.git_version.outputs.version }}"
- name: Push Tag
run: git push origin v${{ steps.git_version.outputs.version }}

View File

@@ -0,0 +1,29 @@
name: Publish to pypi
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.build.txt
- name: Build and publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}