Skip to content

Commit f4cf9ca

Browse files
authored
Update build.yml
1 parent 9b05f7d commit f4cf9ca

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,12 @@ jobs:
6666
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6767

6868
- name: Upload to PyPi
69+
if: startsWith( github.ref, 'refs/tags') && matrix.python-version == env.PYTHON_MAIN_VERSION
70+
env:
71+
PYPI_TOKEN_PASSWORD: ${{ secrets.API_TOKEN_BGLIB }}
72+
run: |
73+
pip install wheel twine
74+
python setup.py sdist bdist_wheel
75+
twine upload --username "__token__" --password $PYPI_TOKEN_PASSWORD dist/*
6976
7077
71-
pypi-publish:
72-
name: Upload to PyPi
73-
runs-on: ubuntu-latest
74-
# Specifying a GitHub environment is optional, but strongly encouraged
75-
#environment: release
76-
permissions:
77-
# IMPORTANT: this permission is mandatory for trusted publishing
78-
id-token: write
79-
steps:
80-
# retrieve your distributions here
81-
82-
- name: Publish package distributions to PyPI
83-
uses: pypa/gh-action-pypi-publish@release/v1
84-

0 commit comments

Comments
 (0)