From 7c43c39eabfd8eac035ebf792c44ade83f5e9a53 Mon Sep 17 00:00:00 2001 From: Georg K Date: Sun, 13 Oct 2024 03:31:42 +0300 Subject: [PATCH] fix: add gitea release CI/CD --- .gitea/workflows/release.yml | 35 +++++++++++++++++++++++++++++++++++ .gitlab-ci.yml | 23 ----------------------- 2 files changed, 35 insertions(+), 23 deletions(-) create mode 100644 .gitea/workflows/release.yml delete mode 100644 .gitlab-ci.yml diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..e02539e --- /dev/null +++ b/.gitea/workflows/release.yml @@ -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 + diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index c14312d..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -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