Skip to content

Commit b7ed182

Browse files
kesmit13claude
andcommitted
Add pre-release tag builds with GitHub Release assets
Enable asset generation on test/rc/alpha/beta tag pushes without publishing to PyPI. Also prevents fusion-docs from triggering on pre-release tags. Ref: PR #123 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3a5c409 commit b7ed182

2 files changed

Lines changed: 26 additions & 5 deletions

File tree

.github/workflows/fusion-docs.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
on:
2-
push:
3-
tags:
4-
- 'v*.*.*'
2+
release:
3+
types: [published]
54

65
name: Generate Fusion docs
76

@@ -36,6 +35,6 @@ jobs:
3635
3736
- name: Upload release asset
3837
run: |
39-
gh release upload ${{ github.ref_name }} fusion-docs.zip
38+
gh release upload ${{ github.event.release.tag_name }} fusion-docs.zip
4039
env:
4140
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
name: Publish packages
88

99
on:
10+
push:
11+
tags:
12+
- 'v*-rc*'
13+
- 'v*-test*'
14+
- 'v*-alpha*'
15+
- 'v*-beta*'
1016
release:
1117
types: [published]
1218
workflow_dispatch:
@@ -159,13 +165,15 @@ jobs:
159165
permissions:
160166
id-token: write # Required for OIDC trusted publishing
161167
actions: read # Required for actions/download-artifact
162-
contents: read # Required for repository access
168+
contents: write # Required for gh release create/upload
163169

164170
environment:
165171
name: publish
166172
url: https://pypi.org/p/singlestoredb
167173

168174
steps:
175+
- uses: actions/checkout@v3
176+
169177
- name: Download Linux wheels and sdist
170178
uses: actions/download-artifact@v4
171179
with:
@@ -184,6 +192,20 @@ jobs:
184192
name: artifacts-macOS
185193
path: dist
186194

195+
- name: Create GitHub Release
196+
if: ${{ github.event_name == 'push' }}
197+
run: |
198+
gh release create ${{ github.ref_name }} dist/* --prerelease --title "${{ github.ref_name }}"
199+
env:
200+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
201+
202+
- name: Upload release assets
203+
if: ${{ github.event_name == 'release' }}
204+
run: |
205+
gh release upload ${{ github.event.release.tag_name }} dist/* --clobber
206+
env:
207+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
208+
187209
- name: Publish to PyPI
188210
if: ${{ github.event_name == 'release' || github.event.inputs.publish_pypi == 'true' }}
189211
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)