diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/build_release.yml similarity index 60% rename from .forgejo/workflows/ci.yml rename to .forgejo/workflows/build_release.yml index 6d68d85..7a716f4 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/build_release.yml @@ -1,5 +1,11 @@ on: push: + tags: + - '[0-9]+\.[0-9]+\.[0-9]+pre[0-9]+' + - '[0-9]+\.[0-9]+\.[0-9]+rc[0-9]+' + - '[0-9]+\.[0-9]+\.[0-9]+a[0-9]+' + - '[0-9]+\.[0-9]+\.[0-9]+b[0-9]+' + - '[0-9]+\.[0-9]+\.[0-9]' jobs: backend-pylint: @@ -20,7 +26,7 @@ jobs: pylint --version pylint **/*.py --exit-zero - build:package: + build-artifacts: needs: ["backend-pylint"] runs-on: docker container: nikolaik/python-nodejs:python3.11-nodejs21 @@ -40,3 +46,18 @@ jobs: with: name: packages path: dist/* + + publish-artifacts: + needs: ["build-artifacts"] + runs-on: docker + container: nikolaik/python-nodejs:python3.11-nodejs21 + steps: + - name: Downloading static site artifacts + uses: actions/download-artifact@v3 + with: + name: packages + path: dist + - name: Install Dependencies + run: pip install twine + - name: Upload package to registry + run: python -m twine upload --repository-url ${{ env.REPOSITORY_URL }} -u ${{ secrets.TWINE_DEPLOY_USER }} -p ${{ secrets.TWINE_DEPLOY_PASSWORD }} dist/* diff --git a/.forgejo/workflows/default.yml b/.forgejo/workflows/default.yml new file mode 100644 index 0000000..3b4878c --- /dev/null +++ b/.forgejo/workflows/default.yml @@ -0,0 +1,21 @@ +on: + push: + +jobs: + backend-pylint: + runs-on: docker + container: nikolaik/python-nodejs:python3.11-nodejs21 + steps: + - name: Checkout source code + uses: https://code.forgejo.org/actions/checkout@v3 + - name: Install packages + working-directory: ./backend + run: | + pip install -e . -q + python -m pip list --format=columns --disable-pip-version-check + pip install pylint~=2.17.7 --disable-pip-version-check -q + - name: Run pylint + working-directory: ./backend + run: | + pylint --version + pylint **/*.py --exit-zero