fix: add gitea release CI/CD
Some checks failed
Release / Distribution (push) Failing after 1m9s

This commit is contained in:
Georg K 2024-10-13 03:31:42 +03:00
parent f8ecc42478
commit 7c43c39eab
2 changed files with 35 additions and 23 deletions

View File

@ -0,0 +1,35 @@
name: Release
run-name: ${{ gitea.actor }} is runs ci pipeline
on:
push:
branches:
- master
jobs:
packaging:
name: Distribution
runs-on: ubuntu-latest
env:
EXT_FIX: "5"
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install poetry
run: python -m pip install poetry chardet
- name: Install poetry compiler
run: poetry install -E compiler
- name: Set poetry version
run: PV=$(poetry version -s) && poetry version ${PV}+jar3b${EXT_FIX}
- name: Build package
run: poetry build
- name: Add pypi source
run: poetry source add --priority=supplemental ahax https://gitea.example.com/api/packages/pub/pypi
- name: Add pypi credentials
run: poetry config http-basic.ahax ${{ secrets.REPO_USER }} ${{ secrets.REPO_PASS }}
- name: Push to pypi
run: poetry publish -r ahax -u ${{ secrets.REPO_USER }} -p ${{ secrets.REPO_PASS }} -n

View File

@ -1,23 +0,0 @@
variables:
ARTIFACT_PATH: /sln/artifacts
stages:
- package
publish-pypi:
stage: package
variables:
EXT_FIX: "4"
image: python:3.12.4-alpine3.20
script:
- apk add --no-cache gcc musl-dev
- pip install chardet poetry
- poetry config virtualenvs.in-project true
- poetry install -E compiler
- PV=$(poetry version -s) && poetry version ${PV}+jar3b${EXT_FIX}
- poetry build
- poetry source add --priority=supplemental connectone ${PYPI_REPO_URL}
- poetry config http-basic.connectone ${PYPI_REPO_USER} ${PYPI_REPO_PASSWORD}
- poetry publish -r connectone -u ${PYPI_REPO_USER} -p ${PYPI_REPO_PASSWORD} -n
only:
- master