Skip to content

Commit 5b28423

Browse files
authored
Update the GHA release workflow with trusted publisher enabled (opensearch-project#614)
* Add GitHub action for opensearch-py release Signed-off-by: Zelin Hao <zelinhao@amazon.com> * Generate GitHub release at the end Signed-off-by: Zelin Hao <zelinhao@amazon.com> * Update CHANGELOG Signed-off-by: Zelin Hao <zelinhao@amazon.com> * Update CHANGELOG Signed-off-by: Zelin Hao <zelinhao@amazon.com> --------- Signed-off-by: Zelin Hao <zelinhao@amazon.com>
1 parent 0cb345d commit 5b28423

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.github/workflows/release-drafter.yml

+23-1
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,33 @@ jobs:
3232
- name: Build project for distribution
3333
run: |
3434
python -m build
35+
- name: upload windows dists
36+
uses: actions/upload-artifact@v3
37+
with:
38+
name: release-dists
39+
path: dist/
40+
41+
pypi-publish:
42+
runs-on: ubuntu-latest
43+
needs:
44+
- draft-a-release
45+
permissions:
46+
id-token: write
47+
contents: write
48+
steps:
49+
- name: Retrieve release distributions
50+
uses: actions/download-artifact@v3
51+
with:
52+
name: release-dists
53+
path: dist
54+
- name: Generate the artifacts
55+
run: |
3556
tar -zvcf artifacts.tar.gz dist
57+
- name: Publish package distributions to PyPI
58+
uses: pypa/gh-action-pypi-publish@release/v1
3659
- name: Release
3760
uses: softprops/action-gh-release@v1
3861
with:
39-
draft: true
4062
generate_release_notes: true
4163
files: |
4264
artifacts.tar.gz

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66
- Added pylint `line-too-long` and `invalid-name` ([#590](https://github.com/opensearch-project/opensearch-py/pull/590))
77
- Added pylint `pointless-statement` ([#611](https://github.com/opensearch-project/opensearch-py/pull/611))
88
- Added a log collection guide ([#579](https://github.com/opensearch-project/opensearch-py/pull/579))
9+
- Added GHA release ([#614](https://github.com/opensearch-project/opensearch-py/pull/614))
910
### Changed
1011
### Deprecated
1112
### Removed

0 commit comments

Comments
 (0)