Add actions?
This commit is contained in:
38
.gitea/workflows/publish.yaml
Normal file
38
.gitea/workflows/publish.yaml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
name: Publish Package
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build Package
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.x"
|
||||||
|
- run: python3 -m pip install build --user
|
||||||
|
- run: python -m build
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: python-package-distributions
|
||||||
|
path: dist/
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
name: Deploy Package
|
||||||
|
needs:
|
||||||
|
- build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.x"
|
||||||
|
- run: python3 -m pip install twine --user
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
name: python-package-distributions
|
||||||
|
path: dist/ # Does this even do anything?
|
||||||
|
- run: ls -laR python-package-distributions
|
||||||
|
- run: TWINE_PASSWORD=${{ secrets.PYPI_PAT }} TWINE_USERNAME=bslathi19 python -m twine upload --repository-url ${{ vars.CI_API_URL }} python-package-distributions/*
|
||||||
|
|
||||||
Reference in New Issue
Block a user