Added twine publish step
All checks were successful
/ backend-pylint (push) Successful in 18s

This commit is contained in:
Firq 2023-12-21 17:22:13 +01:00
parent 03901e1d12
commit 0277169408
Signed by: Firq
GPG key ID: 4DE1059A4666E89F
2 changed files with 43 additions and 1 deletions

View file

@ -1,5 +1,11 @@
on: on:
push: 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: jobs:
backend-pylint: backend-pylint:
@ -20,7 +26,7 @@ jobs:
pylint --version pylint --version
pylint **/*.py --exit-zero pylint **/*.py --exit-zero
build:package: build-artifacts:
needs: ["backend-pylint"] needs: ["backend-pylint"]
runs-on: docker runs-on: docker
container: nikolaik/python-nodejs:python3.11-nodejs21 container: nikolaik/python-nodejs:python3.11-nodejs21
@ -40,3 +46,18 @@ jobs:
with: with:
name: packages name: packages
path: dist/* 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/*

View file

@ -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