Skip to content

Commit 1833ab6

Browse files
committed
add check for branch
1 parent 77406a7 commit 1833ab6

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/wheels.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
name: Build Wheels for Python SDK
22

33
on:
4+
push:
5+
branches:
6+
- sdk-core/*
47
workflow_dispatch:
58

69
jobs:
710
build_wheels:
8-
# if: github.event_name == 'workflow_dispatch'
11+
if: github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/heads/sdk-core/')
912
name: Build wheels for Python SDK on ${{ matrix.os }}
1013
runs-on: ${{ matrix.os }}
1114
strategy:
@@ -45,6 +48,15 @@ jobs:
4548
runs-on: ubuntu-latest
4649
needs: build_wheels
4750
steps:
51+
# Need to grab the SDK version for the wheel name
52+
- name: Extract SDK Version
53+
run: echo "SDK_VERSION=$(python -c 'import version; print(version.SDK_VERSION)')" >> $GITHUB_ENV
54+
4855
- uses: actions/checkout@v4
4956
- name: Build source distribution
50-
run: python setup.py sdist
57+
run: python -m build --sdist
58+
59+
- uses: actions/upload-artifact@v4
60+
with:
61+
name: onepassword-sdk-${{ env.SDK_VERSION }}
62+
path: ./wheelhouse/*.tar.gz

0 commit comments

Comments
 (0)