-
Notifications
You must be signed in to change notification settings - Fork 52
build: Update release CI to use trusted publishers. #4332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few changes. Please request review once addressed
uses: pypa/[email protected] | ||
with: | ||
packages-dir: dist | ||
repository-url: https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/upload | ||
skip-existing: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uses: pypa/[email protected] | |
with: | |
packages-dir: dist | |
repository-url: https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/upload | |
skip-existing: true | |
run: | | |
pip install twine | |
python -m twine upload --skip-existing ./**/*.whl | |
python -m twine upload --skip-existing ./**/*.tar.gz |
The private PyPI needs to use the token approach
with: | ||
packages-dir: dist | ||
repository-url: https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/upload | ||
skip-existing: true | ||
env: | ||
TWINE_USERNAME: PAT | ||
TWINE_PASSWORD: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TWINE_PASSWORD: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }} | |
TWINE_PASSWORD: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }} | |
TWINE_REPOSITORY_URL: https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/upload |
- name: Upload to Public PyPi using trusted publisher | ||
uses: pypa/[email protected] | ||
with: | ||
packages-dir: dist | ||
print-hash: true | ||
skip-existing: false | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.ANSYS_FLUENT_CORE_PYPI_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Upload to Public PyPi using trusted publisher | |
uses: pypa/[email protected] | |
with: | |
packages-dir: dist | |
print-hash: true | |
skip-existing: false | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.ANSYS_FLUENT_CORE_PYPI_TOKEN }} | |
- name: "Download the library artifacts from build-library step" | |
uses: actions/[email protected] | |
with: | |
name: ${{ env.PACKAGE_NAME }}-artifacts | |
path: ${{ env.PACKAGE_NAME }}-artifacts | |
- name: "Upload artifacts to PyPI using trusted publisher" | |
uses: pypa/[email protected] | |
with: | |
repository-url: "https://upload.pypi.org/legacy/" | |
print-hash: true | |
packages-dir: ${{ env.PACKAGE_NAME }}-artifacts | |
skip-existing: false |
@@ -668,4 +673,3 @@ jobs: | |||
files: | | |||
./**/*.whl | |||
./**/*.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./**/*.tar.gz | |
./**/*.tar.gz | |
./**/*-wheelhouse-*.zip |
Wheelhouse is still needed in GitHub release
@RobPasMue, @MaxJPRey could you please look if it conforms with the standards?
Thank you.