support-organizer/.forgejo/workflows/build_release.yml
Firq 0277169408
All checks were successful
/ backend-pylint (push) Successful in 18s
Added twine publish step
2023-12-21 17:22:13 +01:00

64 lines
2 KiB
YAML

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:
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
build-artifacts:
needs: ["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 build
- name: Build package
working-directory: ./backend
run: |
python -m build
cp dist ../dist -r
- name: Save build artifacts
uses: https://code.forgejo.org/actions/upload-artifact@v3
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/*