Added PyPi package build process
This commit is contained in:
parent
eba674f792
commit
c029add9a8
26
.gitea/workflows/build-local.yaml
Normal file
26
.gitea/workflows/build-local.yaml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: Build and Publish Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: local
|
||||||
|
container:
|
||||||
|
image: python:3.12-slim
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
pip install build twine
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Build package
|
||||||
|
run: python -m build
|
||||||
|
- name: Publish to Gitea PyPI
|
||||||
|
env:
|
||||||
|
TWINE_USERNAME: ${{ secrets.PACKAGE_UPLOAD_USERNAME }}
|
||||||
|
TWINE_PASSWORD: ${{ secrets.PACKAGE_UPLOAD_TOKEN }}
|
||||||
|
run: |
|
||||||
|
twine upload \
|
||||||
|
--repository-url https://git.gansejunge.com/api/packages/notifier/pypi \
|
||||||
|
-u $TWINE_USERNAME -p $TWINE_PASSWORD dist/*
|
||||||
26
.gitea/workflows/build.yaml
Normal file
26
.gitea/workflows/build.yaml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: Build and Publish Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: python:3.12-slim
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
pip install build twine
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Build package
|
||||||
|
run: python -m build
|
||||||
|
- name: Publish to Gitea PyPI
|
||||||
|
env:
|
||||||
|
TWINE_USERNAME: ${{ secrets.PACKAGE_UPLOAD_USERNAME }}
|
||||||
|
TWINE_PASSWORD: ${{ secrets.PACKAGE_UPLOAD_TOKEN }}
|
||||||
|
run: |
|
||||||
|
twine upload \
|
||||||
|
--repository-url https://git.gansejunge.com/api/packages/notifier/pypi \
|
||||||
|
-u $TWINE_USERNAME -p $TWINE_PASSWORD dist/*
|
||||||
Loading…
x
Reference in New Issue
Block a user