generated from Templates/Python
add package upload logic
Some checks failed
CI / linter (ubuntu-latest, 3.9) (push) Successful in 35s
SonarQube Scan / SonarQube Trigger (push) Successful in 49s
CI / tests_linux (ubuntu-latest, 3.9) (push) Successful in 37s
Upload Python Package / Create Release (push) Successful in 31s
Rename the project from template / rename-project (push) Successful in 27s
Upload Python Package / deploy (push) Failing after 1m15s
Some checks failed
CI / linter (ubuntu-latest, 3.9) (push) Successful in 35s
SonarQube Scan / SonarQube Trigger (push) Successful in 49s
CI / tests_linux (ubuntu-latest, 3.9) (push) Successful in 37s
Upload Python Package / Create Release (push) Successful in 31s
Rename the project from template / rename-project (push) Successful in 27s
Upload Python Package / deploy (push) Failing after 1m15s
This commit is contained in:
parent
6696271b45
commit
694680ffdf
@ -30,23 +30,25 @@ jobs:
|
||||
with:
|
||||
body_path: release_message.md
|
||||
|
||||
# deploy:
|
||||
# needs: release
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# - name: Set up Python
|
||||
# uses: actions/setup-python@v4
|
||||
# with:
|
||||
# python-version: '3.x'
|
||||
# - name: Install dependencies
|
||||
# run: |
|
||||
# python -m pip install --upgrade pip
|
||||
# pip install setuptools wheel twine
|
||||
# - name: Build and publish
|
||||
# env:
|
||||
# TWINE_USERNAME: __token__
|
||||
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
||||
# run: |
|
||||
# python setup.py sdist bdist_wheel
|
||||
# twine upload dist/*
|
||||
deploy:
|
||||
needs: release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install setuptools wheel twine
|
||||
- name: Build and publish
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
||||
run: |
|
||||
REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $1}')
|
||||
python setup.py sdist bdist_wheel
|
||||
twine upload --repository-url -u gitearobot -p ${{ secrets.PACKAGE_GITEA_PAT }} https://git.disi.dev/api/packages/$REPOSITORY_OWNER/pypi dist/*
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user