mirror of
https://github.com/creyD/creyPY.git
synced 2026-04-12 19:30:30 +02:00
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
name: Lint and tag
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- "**/.github/**"
|
|
- "**/.gitignore"
|
|
- "**/.vscode/**"
|
|
- "**/README.md"
|
|
- "**/CHANGELOG.md"
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: psf/black@stable
|
|
with:
|
|
options: "-l 100 --exclude '/.venv/|/__init__.py'"
|
|
- uses: creyD/autoflake_action@master
|
|
with:
|
|
no_commit: True
|
|
options: --in-place --remove-all-unused-imports -r --exclude **/__init__.py,**/db/models.py,
|
|
- uses: stefanzweifel/git-auto-commit-action@v5
|
|
with:
|
|
commit_message: Adjusted files for isort & autopep
|
|
|
|
tag:
|
|
runs-on: ubuntu-latest
|
|
needs: lint
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: setup git
|
|
run: |
|
|
git config --local user.email "actions@github.com"
|
|
git config --local user.name "GitHub Action"
|
|
|
|
- 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 ${{ steps.git_version.outputs.version }} -m "${{ steps.git_version.outputs.version }}"
|
|
|
|
- uses: stefanzweifel/git-auto-commit-action@v5
|
|
with:
|
|
commit_message: Adjusted files for isort & autopep
|
|
push_options: --tags
|