feat: add workflow to publish to pypi
This commit is contained in:
parent
ec3f3a64cc
commit
15b578388c
2 changed files with 33 additions and 1 deletions
32
.forgejo/workflows/publish.yml
Normal file
32
.forgejo/workflows/publish.yml
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
name: Publish to PyPI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*.*.*"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: python:3.12-bookworm
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
run: |
|
||||||
|
git clone --depth=1 --branch "${{ github.ref_name }}" \
|
||||||
|
"https://oauth2:${{ github.token }}@bitfreedom.net/code/${{ github.repository }}.git" \
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: Install build tools
|
||||||
|
run: pip install build twine
|
||||||
|
|
||||||
|
- name: Build package
|
||||||
|
run: python -m build
|
||||||
|
|
||||||
|
- name: Publish to PyPI
|
||||||
|
env:
|
||||||
|
TWINE_USERNAME: __token__
|
||||||
|
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
|
run: twine upload dist/*
|
||||||
|
|
@ -48,5 +48,5 @@ Documentation = "https://github.com/nomyo-ai/nomyo/doc"
|
||||||
Repository = "https://github.com/nomyo-ai/nomyo"
|
Repository = "https://github.com/nomyo-ai/nomyo"
|
||||||
Issues = "https://github.com/nomyo-ai/nomyo/issues"
|
Issues = "https://github.com/nomyo-ai/nomyo/issues"
|
||||||
|
|
||||||
[tool.setuptools]
|
[tool.hatch.build.targets.wheel]
|
||||||
packages = ["nomyo"]
|
packages = ["nomyo"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue