Add gitea workflow to test and upload package
This commit is contained in:
parent
98daa460a6
commit
7acdfa1792
21
.gitea/workflows/upload-package.yaml
Normal file
21
.gitea/workflows/upload-package.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
name: Upload Package
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branch: main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test and upload package:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: pip install -r requirements.txt
|
||||||
|
- run: pip install -r test-requirements.txt
|
||||||
|
- run: pytest --cov=openapi_client_udm
|
||||||
|
|
||||||
|
- run: pip install twine
|
||||||
|
- run: python3 -m build
|
||||||
|
- run: python3 -m twine upload dist/*
|
||||||
|
env:
|
||||||
|
TWINE_REPOSITORY_URL: "${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/pypi"
|
||||||
|
TWINE_USERNAME: "${{ secrets.PACKAGE_REPO_USERNAME }}"
|
||||||
|
TWINE_PASSWORD: "${{ secrets.PACKAGE_REPO_PASSWORD }}"
|
Loading…
Reference in New Issue
Block a user