Added PyPi package build process
This commit is contained in:
parent
eba674f792
commit
cd35c5b818
25
.gitea/workflows/build-local.yaml
Normal file
25
.gitea/workflows/build-local.yaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
name: Build and Publish Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: local
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build & Publish in container
|
||||||
|
uses: addnab/docker-run-action@v3
|
||||||
|
with:
|
||||||
|
image: python:3.12-slim
|
||||||
|
options: -v $WORKSPACE:/app -w /app
|
||||||
|
run: |
|
||||||
|
pip install build twine
|
||||||
|
python -m build
|
||||||
|
twine upload \
|
||||||
|
--repository-url https://git.gansejunge.com/api/packages/notifier/pypi \
|
||||||
|
-u ${{ secrets.PACKAGE_UPLOAD_USERNAME }} \
|
||||||
|
-p ${{ secrets.PACKAGE_UPLOAD_TOKEN }} \
|
||||||
|
dist/*
|
||||||
25
.gitea/workflows/build.yaml
Normal file
25
.gitea/workflows/build.yaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
name: Build and Publish Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build & Publish in container
|
||||||
|
uses: addnab/docker-run-action@v3
|
||||||
|
with:
|
||||||
|
image: python:3.12-slim
|
||||||
|
options: -v $WORKSPACE:/app -w /app
|
||||||
|
run: |
|
||||||
|
pip install build twine
|
||||||
|
python -m build
|
||||||
|
twine upload \
|
||||||
|
--repository-url https://git.gansejunge.com/api/packages/notifier/pypi \
|
||||||
|
-u ${{ secrets.PACKAGE_UPLOAD_USERNAME }} \
|
||||||
|
-p ${{ secrets.PACKAGE_UPLOAD_TOKEN }} \
|
||||||
|
dist/*
|
||||||
Loading…
x
Reference in New Issue
Block a user