Skip to content

Commit 02bd152

Browse files
committed
TO BE REVIEWED
1 parent d334d2d commit 02bd152

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

‎.github/workflows/cd.yml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,32 @@ jobs:
7979
with:
8080
repository-url: https://test.pypi.org/legacy/
8181

82+
create-github-pre-release:
83+
if: startsWith(github.ref, 'refs/tags/') == false
84+
needs: [build-distributables, publish-pre-release]
85+
runs-on: ubuntu-latest
86+
permissions:
87+
contents: write
88+
steps:
89+
- name: Download distributables
90+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
91+
with:
92+
name: splunk-sdk-${{ needs.build-distributables.outputs.version }}
93+
path: ${{ env.DIST_DIR }}
94+
- name: Create GitHub pre-release
95+
env:
96+
GH_TOKEN: ${{ github.token }}
97+
GH_REPO: ${{ github.repository }}
98+
VERSION: ${{ needs.build-distributables.outputs.version }}
99+
RUN_NUMBER: ${{ github.run_number }}
100+
DIST_GLOB: ${{ env.DIST_DIR }}*
101+
run: |
102+
gh release create "v${VERSION}" \
103+
--prerelease \
104+
--title "v${VERSION}" \
105+
--notes "Automated pre-release from run ${RUN_NUMBER}." \
106+
${DIST_GLOB}
107+
82108
publish-release:
83109
if: startsWith(github.ref, 'refs/tags/') == true
84110
needs: build-distributables

0 commit comments

Comments
 (0)