-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6250267
build: Update release CI to use trusted publishers.
prmukherj 5fcb226
chore: adding changelog file 4332.dependencies.md [dependabot-skip]
pyansys-ci-bot c2ae3ae
Merge branch 'main' into chore/update_release_ci
prmukherj 0f103f9
Merge branch 'main' into chore/update_release_ci
prmukherj 3b98031
Merge branch 'main' into chore/update_release_ci
prmukherj f37b921
chore: adding changelog file 4332.dependencies.md [dependabot-skip]
pyansys-ci-bot fe3155d
Clean up.
prmukherj 2b0dc0d
Update .github/workflows/ci.yml
prmukherj ab7985e
Update .github/workflows/ci.yml
prmukherj bd28274
Merge branch 'main' into chore/update_release_ci
prmukherj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -632,6 +632,10 @@ | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
needs: [test, update-changelog, nightly-dev-test] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write # required for trusted publishing | ||
contents: write # required for GitHub release upload | ||
|
||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
|
@@ -653,14 +657,19 @@ | |
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 | ||
run: | | ||
pip install twine | ||
twine upload --skip-existing ./**/*.whl | ||
python -m twine upload --skip-existing ./**/*.tar.gz | ||
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 | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Update release CI to use trusted publishers. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.