diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..5e758f6 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,21 @@ +--- +name: build +on: + - push + +jobs: + build: + runs-on: fedora-builder + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Build package + run: python3 -m build + - name: run tox + run: tox + - name: Upload na pypi + env: + TWINE_USERNAME: ${{ secret.PYPI_USER }} + TWINE_PASSWORD: ${{ secret.PYPI_PASSWORD }} + if: github.ref_type == 'tag' + run: python3 -m twine upload dist/* diff --git a/githooks/pre-commit b/githooks/pre-commit index 8490c37..9f78ba4 100755 --- a/githooks/pre-commit +++ b/githooks/pre-commit @@ -2,9 +2,10 @@ set -e +yamllint .gitea/workflows/*yml + VERSION=$(grep version setup.cfg | sed 's/.*= *//') sed -i "s/^__version__ = .*/__version__ = '${VERSION}'/" src/lmwsip/__init__.py git add src/lmwsip/__init__.py tox -yamllint .drone.yml