Added PyPi package build process
This commit is contained in:
parent
eba674f792
commit
07ce9d1686
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
|
||||
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
|
||||
shell: /usr/bin/bash
|
||||
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/*
|
||||
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
|
||||
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
|
||||
shell: /usr/bin/bash
|
||||
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