Kumi
a8d1a8b4c3
Migrated the CI/CD pipeline for PyPI package publishing from GitLab CI to Forgejo workflows. This change introduces a new `release.yml` workflow in the `.forgejo/workflows` directory, designed to trigger on tagged commits with a version identifier. The new workflow uses a Node.js container to manage the Python environment setup and package publication. By switching to Forgejo, we aim to consolidate CI/CD processes and improve integration within our development workflow. This migration removes the previous `.gitlab-ci.yml` file, reflecting a shift away from GitLab CI in our project infrastructure.
32 lines
697 B
YAML
32 lines
697 B
YAML
name: Python Package CI/CD
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
publish:
|
|
name: Publish to PyPI
|
|
container:
|
|
image: node:20-bookworm
|
|
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
apt update
|
|
apt install -y python3 python3-venv
|
|
|
|
- name: Publish to PyPI
|
|
run: |
|
|
python3 -m venv venv
|
|
. ./venv/bin/activate
|
|
pip install -U hatchling twine build
|
|
python -m build .
|
|
python -m twine upload --username __token__ --password ${PYPI_TOKEN} dist/*
|
|
env:
|
|
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|