Update the GHA release workflow with trusted publisher enabled (#614)

* Add GitHub action for opensearch-py release

Signed-off-by: Zelin Hao <[email protected]>

* Generate GitHub release at the end

Signed-off-by: Zelin Hao <[email protected]>

* Update CHANGELOG

Signed-off-by: Zelin Hao <[email protected]>

* Update CHANGELOG

Signed-off-by: Zelin Hao <[email protected]>

---------

Signed-off-by: Zelin Hao <[email protected]>
This commit is contained in:
Zelin Hao
2023-11-22 20:49:47 -05:00
committed by GitHub
parent 0cb345db6e
commit 5b28423f71
2 changed files with 24 additions and 1 deletions
+23 -1
View File
@@ -32,11 +32,33 @@ jobs:
- name: Build project for distribution
run: |
python -m build
- name: upload windows dists
uses: actions/upload-artifact@v3
with:
name: release-dists
path: dist/
pypi-publish:
runs-on: ubuntu-latest
needs:
- draft-a-release
permissions:
id-token: write
contents: write
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v3
with:
name: release-dists
path: dist
- name: Generate the artifacts
run: |
tar -zvcf artifacts.tar.gz dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
generate_release_notes: true
files: |
artifacts.tar.gz