Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
197 commits
Select commit Hold shift + click to select a range
ac62426
add wheels yml
MOmarMiraj Mar 6, 2025
4382160
Merge pull request #1 from MOmarMiraj/omar/automate-wheel-build
MOmarMiraj Mar 6, 2025
f9b48fe
fake release
MOmarMiraj Mar 6, 2025
2f718dc
Merge branch 'main' into sdk-core/jep
MOmarMiraj Mar 6, 2025
2611ba2
Merge pull request #2 from MOmarMiraj/sdk-core/jep
MOmarMiraj Mar 6, 2025
07a0d59
update test_client
MOmarMiraj Mar 6, 2025
94d1381
Merge pull request #3 from MOmarMiraj/sdk-core/jep2
MOmarMiraj Mar 6, 2025
464a1bd
fix wheels building
MOmarMiraj Mar 6, 2025
42894bf
Merge pull request #4 from MOmarMiraj/sdk-core/jep3
MOmarMiraj Mar 6, 2025
471dbb8
fix path for publish to pyipi'
MOmarMiraj Mar 6, 2025
d7e3981
Merge pull request #5 from MOmarMiraj/sdk-core/jep4
MOmarMiraj Mar 6, 2025
3e7941d
update download artifact file
MOmarMiraj Mar 6, 2025
cfc6e07
Merge pull request #6 from MOmarMiraj/sdk-core/jep5
MOmarMiraj Mar 6, 2025
cfb8eb8
unpack all of the files
MOmarMiraj Mar 6, 2025
591c277
:add new lieqw;
MOmarMiraj Mar 6, 2025
c251be3
Merge pull request #7 from MOmarMiraj/sdk-core/jep6
MOmarMiraj Mar 6, 2025
767cc18
eqw
MOmarMiraj Mar 6, 2025
ad81f45
Merge pull request #8 from MOmarMiraj/sdk-core/jep7
MOmarMiraj Mar 6, 2025
a1c5dbb
update to latest pypi upload to support metadata
MOmarMiraj Mar 6, 2025
d74816a
Merge pull request #9 from MOmarMiraj/sdk-core/jep8
MOmarMiraj Mar 6, 2025
fc28611
publish using manual twine command instaed of github action
MOmarMiraj Mar 7, 2025
29c5f91
Merge pull request #10 from MOmarMiraj/sdk-core/jep9
MOmarMiraj Mar 7, 2025
91b3c62
point to a newer pyton version
MOmarMiraj Mar 7, 2025
b34c883
Merge pull request #11 from MOmarMiraj/sdk-core/jep10
MOmarMiraj Mar 7, 2025
bd8d6fe
switch to python3
MOmarMiraj Mar 7, 2025
40e5620
Merge pull request #12 from MOmarMiraj/sdk-core/jep-11
MOmarMiraj Mar 7, 2025
86fb17d
upgrade dependencies
MOmarMiraj Mar 7, 2025
66cbb18
Merge pull request #13 from MOmarMiraj/sdk-core/jep12
MOmarMiraj Mar 7, 2025
b288cc6
fix release scripts and add pyproject toml to fix metadata
MOmarMiraj Mar 8, 2025
27e49cb
Merge pull request #14 from MOmarMiraj/sdk-core/jep13
MOmarMiraj Mar 8, 2025
3dca01f
fix sdk version finding and change back to using github action
MOmarMiraj Mar 8, 2025
2222cf2
Merge pull request #15 from MOmarMiraj/sdk-core/jep14
MOmarMiraj Mar 8, 2025
89e9bb8
update version and fix version acuqiring
MOmarMiraj Mar 8, 2025
0b28a3d
Merge pull request #16 from MOmarMiraj/sdk-core/jep15
MOmarMiraj Mar 8, 2025
a8e32ae
add prep release file
MOmarMiraj Mar 8, 2025
7da47b6
Merge branch 'main' of https://github.com/MOmarMiraj/onepassword-sdk-…
MOmarMiraj Mar 8, 2025
8c519d5
test
MOmarMiraj Mar 8, 2025
98da6b0
fix release script
MOmarMiraj Mar 8, 2025
7cbe9ff
Merge remote-tracking branch 'origin' into sdk-core/test-prep-release
MOmarMiraj Mar 8, 2025
c667a0a
debug :
MOmarMiraj Mar 8, 2025
dd9e820
Merge remote-tracking branch 'origin' into sdk-core/test-prep-release
MOmarMiraj Mar 8, 2025
dae0718
fix setup
MOmarMiraj Mar 8, 2025
65d1fc2
Merge remote-tracking branch 'origin' into sdk-core/test-prep-release
MOmarMiraj Mar 8, 2025
01660a6
remove carriage reeturns
MOmarMiraj Mar 8, 2025
dc5cee6
Merge remote-tracking branch 'origin' into sdk-core/test-prep-release
MOmarMiraj Mar 8, 2025
0ef9d4f
remove notes
MOmarMiraj Mar 8, 2025
64be88b
Merge remote-tracking branch 'origin' into sdk-core/test-prep-release
MOmarMiraj Mar 8, 2025
82c6ef9
Merge pull request #17 from MOmarMiraj/sdk-core/test-prep-release
MOmarMiraj Mar 8, 2025
9cb1517
push
MOmarMiraj Mar 8, 2025
35a88f6
Merge branch 'main' of https://github.com/MOmarMiraj/onepassword-sdk-…
MOmarMiraj Mar 8, 2025
7d18987
remove notes
MOmarMiraj Mar 8, 2025
0ab8356
fix release'
MOmarMiraj Mar 19, 2025
f88a029
Merge pull request #19 from MOmarMiraj/omar/jep1234
MOmarMiraj Mar 19, 2025
b2f7a18
fix prep-release script
MOmarMiraj Mar 19, 2025
9111713
format via json
MOmarMiraj Mar 19, 2025
cc28808
pass the release notes to the release notes file
MOmarMiraj Mar 19, 2025
a1d0feb
store output to json file
MOmarMiraj Mar 19, 2025
cc66455
use to json
MOmarMiraj Mar 19, 2025
a5be51f
use github toJson and fromJSON
MOmarMiraj Mar 19, 2025
3160516
dont convert to json
MOmarMiraj Mar 19, 2025
f7e7467
make into manual job
MOmarMiraj Mar 19, 2025
45af91b
add git identity and fix run make file
MOmarMiraj Mar 19, 2025
8e49a04
add github token
MOmarMiraj Mar 19, 2025
19d03ff
add github identiy
MOmarMiraj Mar 19, 2025
1025e21
change to GH_TOKEN
MOmarMiraj Mar 19, 2025
0f6ee4d
turn off gpg signing
MOmarMiraj Mar 19, 2025
788850a
turn off gpg signing
MOmarMiraj Mar 19, 2025
6f979a9
add bot
MOmarMiraj Mar 19, 2025
b9e04eb
test commit
MOmarMiraj Mar 19, 2025
435322d
mov'
MOmarMiraj Mar 19, 2025
e1aaffc
remove signing key
MOmarMiraj Mar 19, 2025
bb2bb0c
remove persist cred
MOmarMiraj Mar 19, 2025
f4a0341
fix prep-release script
MOmarMiraj Mar 19, 2025
846e658
uipdae makeifle
MOmarMiraj Mar 19, 2025
bb2a16d
put quotes around notes
MOmarMiraj Mar 19, 2025
c17b8e2
properly wrap around dbl quotes
MOmarMiraj Mar 19, 2025
378938c
properly wrap around dbl quotes
MOmarMiraj Mar 19, 2025
f5d328a
update release notes grab
MOmarMiraj Mar 19, 2025
73a5c63
revert release ntoes
MOmarMiraj Mar 19, 2025
95bd5fe
remove quotes from rlse note
MOmarMiraj Mar 19, 2025
96e45fa
preserve multiline
MOmarMiraj Mar 19, 2025
1b6e403
directly throw input into release notes
MOmarMiraj Mar 19, 2025
120b969
fix path
MOmarMiraj Mar 19, 2025
0dda889
skip release notes
MOmarMiraj Mar 19, 2025
5e7c1af
preserve newlines
MOmarMiraj Mar 19, 2025
5e333cb
convert new line
MOmarMiraj Mar 19, 2025
b861b48
fix'
MOmarMiraj Mar 19, 2025
8e9284c
edit release script and add release.yml
MOmarMiraj Mar 19, 2025
36e7bc8
add signing capabilities
MOmarMiraj Mar 19, 2025
7aefdc6
test commit
MOmarMiraj Mar 19, 2025
2bbbdd9
remove passphrase
MOmarMiraj Mar 19, 2025
8192c09
Merge branch 'main' into sdk-core/jep491
MOmarMiraj Mar 19, 2025
785cce5
Release v0.4.0
MOmarMiraj Mar 19, 2025
3d56b70
update release script
MOmarMiraj Mar 19, 2025
bc9a2ed
Merge branch 'main' into sdk-core/jep491
MOmarMiraj Mar 19, 2025
04378aa
Merge branch 'sdk-core/jep491' of https://github.com/MOmarMiraj/onepa…
MOmarMiraj Mar 19, 2025
e7a07af
Merge pull request #20 from MOmarMiraj/sdk-core/jep491
MOmarMiraj Mar 19, 2025
a1457d9
add test artifacts
MOmarMiraj Apr 2, 2025
9b93d39
add lib and fix comment
MOmarMiraj Apr 2, 2025
0bea9ae
Merge pull request #21 from MOmarMiraj/sdk-core/jep-123
MOmarMiraj Apr 2, 2025
4d8e2a6
add lib
MOmarMiraj Apr 2, 2025
1909b62
Merge branch 'main' of https://github.com/MOmarMiraj/onepassword-sdk-…
MOmarMiraj Apr 2, 2025
309650a
fix setup and core.py to correctly include the new libs
MOmarMiraj Apr 2, 2025
96308d9
test commit
MOmarMiraj Apr 2, 2025
cb6a7b5
Merge pull request #22 from MOmarMiraj/sdk-core/jep12341241245
MOmarMiraj Apr 2, 2025
96e968a
add linux and windows shared libs
MOmarMiraj Apr 2, 2025
468a136
test commit
MOmarMiraj Apr 2, 2025
8a47252
Merge pull request #23 from MOmarMiraj/sdk-core/mio
MOmarMiraj Apr 2, 2025
74ff282
update test client
MOmarMiraj Apr 2, 2025
a7f344d
erge branch 'main' of https://github.com/MOmarMiraj/onepassword-sdk-p…
MOmarMiraj Apr 2, 2025
ed1a5a9
test commit
MOmarMiraj Apr 2, 2025
3f82254
Merge pull request #24 from MOmarMiraj/sdk-core/finally
MOmarMiraj Apr 2, 2025
8f53f61
revert
MOmarMiraj Apr 3, 2025
638fa95
push
MOmarMiraj Apr 3, 2025
f2c8676
Merge pull request #25 from MOmarMiraj/sdk-core/tes-wheel
MOmarMiraj Apr 3, 2025
808eea7
revert lib
MOmarMiraj Apr 3, 2025
0d1ef9b
revert
MOmarMiraj Apr 3, 2025
4190dac
test
MOmarMiraj Apr 3, 2025
c4eddc5
Merge pull request #26 from MOmarMiraj/sdk-core/test-jkeqw
MOmarMiraj Apr 3, 2025
5aada8d
go bacck to old changes
MOmarMiraj Apr 3, 2025
3559208
Merge branch 'main' of https://github.com/MOmarMiraj/onepassword-sdk-…
MOmarMiraj Apr 3, 2025
83c989b
test commits
MOmarMiraj Apr 3, 2025
339677f
Merge pull request #27 from MOmarMiraj/sdk-core/finally-fix
MOmarMiraj Apr 3, 2025
2fc1b41
add correct dylibs
MOmarMiraj Apr 3, 2025
96e62cb
edit commit
MOmarMiraj Apr 3, 2025
3b8b095
Merge pull request #28 from MOmarMiraj/sdk-core/fianwrjqwerikq
MOmarMiraj Apr 3, 2025
3773ec8
fix name
MOmarMiraj Apr 3, 2025
487d3e9
add
MOmarMiraj Apr 3, 2025
a44c5b6
Merge pull request #29 from MOmarMiraj/sdk-core/sofuny
MOmarMiraj Apr 3, 2025
a1b37c5
fix naem
MOmarMiraj Apr 3, 2025
763c282
push
MOmarMiraj Apr 3, 2025
dc0526b
Merge pull request #30 from MOmarMiraj/sdk-core/FINALLYFAL
MOmarMiraj Apr 3, 2025
13bb015
fix core.py version comparsion and lower of arch
MOmarMiraj Apr 3, 2025
2eb7077
the working commit
MOmarMiraj Apr 3, 2025
98e8915
Merge pull request #31 from MOmarMiraj/sdk-core/finallythiswillwork
MOmarMiraj Apr 3, 2025
e4c7cef
fix core versioning
MOmarMiraj Apr 3, 2025
296db3d
plz work
MOmarMiraj Apr 3, 2025
ba23974
Merge pull request #32 from MOmarMiraj/sdk-core/okplzwork
MOmarMiraj Apr 3, 2025
bf2195e
upload artifacts even if job fials
MOmarMiraj Apr 3, 2025
3b97197
test wheel
MOmarMiraj Apr 3, 2025
997f037
Merge pull request #33 from MOmarMiraj/sdk-core/test-wheel
MOmarMiraj Apr 3, 2025
6319f96
add debuging for wheels'
MOmarMiraj Apr 3, 2025
5614659
Merge branch 'main' of https://github.com/MOmarMiraj/onepassword-sdk-…
MOmarMiraj Apr 3, 2025
fbd69d3
testplz
MOmarMiraj Apr 3, 2025
7db1c33
Merge pull request #34 from MOmarMiraj/sdk-core/omg
MOmarMiraj Apr 3, 2025
cd62db8
fix setup.py to finally fix this shit
MOmarMiraj Apr 3, 2025
19051a7
:wqMerge branch 'main' of https://github.com/MOmarMiraj/onepassword-s…
MOmarMiraj Apr 3, 2025
e3566c2
working commit
MOmarMiraj Apr 3, 2025
ca5f8fa
Merge pull request #35 from MOmarMiraj/sdk-core/thiswillwork
MOmarMiraj Apr 3, 2025
c7b8f49
compile dylib on Rosetta
MOmarMiraj Apr 3, 2025
df6a929
Merge branch 'main' of https://github.com/MOmarMiraj/onepassword-sdk-…
MOmarMiraj Apr 3, 2025
0cc9584
fix
MOmarMiraj Apr 3, 2025
6cf8b4f
Merge pull request #36 from MOmarMiraj/sdk-core/pleasepleasepleasework
MOmarMiraj Apr 3, 2025
139044c
fix repair wheel cmd on macos
MOmarMiraj Apr 3, 2025
207e31d
test
MOmarMiraj Apr 3, 2025
e71f70d
Merge pull request #37 from MOmarMiraj/sdk-core/jwqeiqweo
MOmarMiraj Apr 3, 2025
0d2641e
revert .dylib
MOmarMiraj Apr 3, 2025
0935579
Merge branch 'main' of https://github.com/MOmarMiraj/onepassword-sdk-…
MOmarMiraj Apr 3, 2025
cc5775d
testqqwe
MOmarMiraj Apr 3, 2025
fc6e8d5
Merge pull request #38 from MOmarMiraj/sdk-core/owqe12q3
MOmarMiraj Apr 3, 2025
ea26930
revert back to old changes and add dylib for macos min 12
MOmarMiraj Apr 3, 2025
f1fa209
Merge branch 'main' of https://github.com/MOmarMiraj/onepassword-sdk-…
MOmarMiraj Apr 3, 2025
9175792
add min macos
MOmarMiraj Apr 3, 2025
45eed6c
Merge pull request #39 from MOmarMiraj/sdk-core/finallyhirswioewolrokr
MOmarMiraj Apr 3, 2025
4b98c58
repair windows wheels too
MOmarMiraj Apr 3, 2025
d721198
fix environment name
MOmarMiraj Apr 3, 2025
9d24a60
Merge pull request #40 from MOmarMiraj/sdk-core/repair-windows
MOmarMiraj Apr 3, 2025
080e1df
Fix name of Release
MOmarMiraj Apr 3, 2025
34b6868
Release v0.4.1
MOmarMiraj Apr 3, 2025
d9bbc8f
Merge pull request #41 from MOmarMiraj/sdk-core/test-release-candidate
MOmarMiraj Apr 3, 2025
4b32bd9
add passphrase
MOmarMiraj Apr 3, 2025
6c27403
Test Commit
MOmarMiraj Apr 3, 2025
8d83ec6
Release v0.5.0
Apr 3, 2025
b29fff4
Merge pull request #42 from MOmarMiraj/sdk-core/test-rc
MOmarMiraj Apr 3, 2025
40e74c5
update git setup and remove release notes
MOmarMiraj Apr 4, 2025
0acf20f
test commits
MOmarMiraj Apr 4, 2025
552872d
Release v0.5.2
MOmarMiraj Apr 4, 2025
ef1adf6
Merge pull request #43 from MOmarMiraj/sdk-core/test-without-release
MOmarMiraj Apr 4, 2025
5196f5b
change to github action bot
MOmarMiraj Apr 4, 2025
ac9dffe
lets test this prep relase commit
MOmarMiraj Apr 4, 2025
44bbae0
Release v0.5.3
github-actions[bot] Apr 4, 2025
f1bbe47
Merge pull request #44 from MOmarMiraj/sdk-core/tstrelease
MOmarMiraj Apr 4, 2025
3a5b404
update email and gpg and passphrase
MOmarMiraj Apr 4, 2025
d0bb112
add building of wheels and publish to pypi on release
MOmarMiraj May 9, 2025
4262962
test commit
MOmarMiraj May 9, 2025
00f5e8d
Release v0.6.0
github-actions[bot] May 9, 2025
6f3dd13
Merge pull request #46 from MOmarMiraj/sdk-core/newflow
MOmarMiraj May 9, 2025
2ea4a5a
remove merge check
MOmarMiraj May 9, 2025
af42623
fmt fix
MOmarMiraj May 9, 2025
b4103da
Release v0.7.0
github-actions[bot] May 9, 2025
7bee5ef
Merge pull request #47 from MOmarMiraj/sdk-core/newnewflow
MOmarMiraj May 9, 2025
5373eb2
fix starting condition
MOmarMiraj May 9, 2025
4b91e22
remove prep-release.yml
MOmarMiraj May 12, 2025
878f5ec
fix the job priority
MOmarMiraj May 12, 2025
6f1a84e
fix release scripts
MOmarMiraj May 12, 2025
89a9664
test commit
MOmarMiraj May 12, 2025
373d963
Release v0.8.2
github-actions[bot] May 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 174 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
name: Release SDK on GitHub

on:
workflow_dispatch:
inputs:
version:
description: "Version number"
required: true
type: string
build_number:
description: "Build number "
required: true
type: string

jobs:
prepare-release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/heads/sdk-core/') # Only run on branches that start with sdk-core/
steps:
- name: Checkout the code
uses: actions/checkout@v4

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true

- name: Parse and Validate Inputs
run: |
# Get inputs passed to the workflow
VERSION="${{ github.event.inputs.version }}"
BUILD_NUMBER="${{ github.event.inputs.build_number }}"

# Save the parsed values for future steps
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_ENV
shell: bash

- name: Run the Prep Release Script
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
make prep-release VERSION="$VERSION" BUILD_NUMBER="$BUILD_NUMBER"
shell: bash

build-wheels:
name: Build wheels for Python SDK on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: startsWith(github.ref, 'refs/heads/sdk-core/')
needs: [prepare-release]
strategy:
fail-fast: false
matrix:
# macOS 13 is an Intel runner and macOS 14 is an Apple Silicon runner
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-latest, macos-13, macos-14]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Upgrade build dependencies
run: python -m pip install --upgrade pip setuptools wheel

# Need to grab the SDK version for the wheel name
- name: Extract SDK Version
run: echo "SDK_VERSION=$(cat version.txt)" >> "$GITHUB_ENV"
shell: bash

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel

- name: Build wheels
env:
CIBW_SKIP: pp* *-musllinux_*
CIBW_MANYLINUX_X86_64_IMAGE: "quay.io/pypa/manylinux_2_34_x86_64"
CIBW_MANYLINUX_AARCH64_IMAGE: "quay.io/pypa/manylinux_2_34_aarch64"
CIBW_ARCHS: "native"
CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}"
CIBW_TEST_REQUIRES: "pydantic pytest pytest-asyncio"
MACOSX_DEPLOYMENT_TARGET: "12.0"
CIBW_TEST_COMMAND: "python -m pytest {project}/src/onepassword/test_client.py"
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.TEST_SERVICE_ACCOUNT_TOKEN }}
CIBW_ENVIRONMENT_PASS_LINUX: OP_SERVICE_ACCOUNT_TOKEN # We have to specify this to pass the token to the test command
run: |
python -m cibuildwheel --output-dir dist

- uses: actions/upload-artifact@v4
with:
name: onepassword-sdk-${{ env.SDK_VERSION }}-${{ matrix.os }}
path: ./dist/*.whl
# test
build-sdist:
name: Build source distribution for Python SDK
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/heads/sdk-core/')
needs: [prepare-release]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
# Need to grab the SDK version for the wheel name
- name: Extract SDK Version
run: echo "SDK_VERSION=$(cat version.txt)" >> "$GITHUB_ENV"
shell: bash

- name: Install dependencies
run: pip3 install build pydantic pytest pytest-asyncio

- name: Build source distribution
run: python3 -m build --sdist

- name: Test Source Distribution
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.TEST_SERVICE_ACCOUNT_TOKEN }}
run: |
python3 -m pip install dist/*.tar.gz
python3 -m pytest src/onepassword/test_client.py

- uses: actions/upload-artifact@v4
with:
name: onepassword-sdk-${{ env.SDK_VERSION }}
path: ./dist/*.tar.gz

Release-SDK:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/heads/sdk-core/') # Only run on branches that start with sdk-core/
needs: [build-wheels, build-sdist]
steps:
- name: Checkout the code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
git_tag_gpgsign: true

- name: Run the Release Script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make release
shell: bash

publish-to-pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/heads/sdk-core/')
environment:
name: testpypi
url: https://test.pypi.org/project/onepassword-sdk/
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
needs: [release-sdk]
steps:
- uses: actions/download-artifact@v4
with:
pattern: onepassword-sdk-*
path: ./dist
merge-multiple: true
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1.12
with:
repository-url: https://test.pypi.org/legacy/
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ release:
src/release/scripts/release.sh

prep-release:
src/release/scripts/prep-release.sh
src/release/scripts/prep-release.sh $(VERSION) $(BUILD_NUMBER) "$(RELEASE_NOTES)"

build-wheels:
src/release/scripts/build-wheels.sh $(PYTHON_VERSIONS)

release/install-dependencies:
# Install latest version of pyenv if not already installed
brew install pyenv

# Install all the python versions we support in one line
pyenv install --skip-existing $(PYTHON_VERSIONS)

Expand All @@ -21,4 +21,3 @@ release/install-dependencies:
pyenv local $$version; \
pyenv exec pip3 install wheel setuptools build --break-system-packages; \
done

21 changes: 21 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[build-system]
requires = ["setuptools>=66", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "onepassword-sdk"
dynamic = ["version"]
description = "The 1Password Python SDK offers programmatic read access to your secrets in 1Password in an interface native to Python."
authors = [{ name = "1Password" }]
license = { file = "LICENSE" }
readme = "README.md"
requires-python = ">=3.9"
dependencies = [
"pydantic>=2.5",
]

[project.urls]
Homepage = "https://github.com/1Password/onepassword-sdk-python"

[tool.setuptools.dynamic]
version = {file = "./version.txt"}
33 changes: 5 additions & 28 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from pathlib import Path
from setuptools import setup, find_packages
from setuptools import setup, find_packages, Distribution
from sysconfig import get_platform
from version import SDK_VERSION
import platform
import os

Expand All @@ -19,6 +17,9 @@ def finalize_options(self):
except ImportError:
bdist_wheel = None

class BinaryDistribution(Distribution):
def has_ext_modules(self):
return True

def get_shared_library_data_to_include():
# Return the correct uniffi C shared library extension for the given platform
Expand Down Expand Up @@ -46,35 +47,11 @@ def get_shared_library_data_to_include():


setup(
name="onepassword-sdk",
version=SDK_VERSION,
author="1Password",
long_description=(Path(__file__).parent / "README.md").read_text(),
long_description_content_type="text/markdown",
description="The 1Password Python SDK offers programmatic read access to your secrets in 1Password in an interface native to Python.",
url="https://github.com/1Password/onepassword-sdk-python",
packages=find_packages(
where="src",
),
license="MIT",
license_files="LICENSE",
distclass=BinaryDistribution,
package_dir={"": "src"},
python_requires=">=3.9",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
],
cmdclass={"bdist_wheel": bdist_wheel},
package_data={"": get_shared_library_data_to_include()},
install_requires=[
"pydantic>=2.5", # Minimum Pydantic version to run the Python SDK
],
)
2 changes: 1 addition & 1 deletion src/onepassword/build_number.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SDK_BUILD_NUMBER = "0020001"
SDK_BUILD_NUMBER = "0080200"
3 changes: 1 addition & 2 deletions src/onepassword/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from onepassword.errors import raise_typed_exception

# In empirical tests, we determined that maximum message size that can cross the FFI boundary
# In empirical tests, we determined that maximum message size that can cross the FFI boundary
# is ~128MB. Past this limit, FFI will throw an error and the program will crash.
# We set the limit to 50MB to be safe and consistent with the other SDKs (where this limit is 64MB), to be reconsidered upon further testing
MESSAGE_LIMIT = 50 * 1024 * 1024
Expand All @@ -19,7 +19,6 @@
f"Your machine's architecture is not currently supported: {machine_arch}"
)


# InitClient creates a client instance in the current core module and returns its unique ID.
async def _init_client(client_config):
try:
Expand Down
Binary file modified src/onepassword/lib/aarch64/libop_uniffi_core.dylib
Binary file not shown.
Binary file modified src/onepassword/lib/aarch64/libop_uniffi_core.so
Binary file not shown.
Binary file modified src/onepassword/lib/x86_64/libop_uniffi_core.dylib
Binary file not shown.
Binary file modified src/onepassword/lib/x86_64/libop_uniffi_core.so
Binary file not shown.
Binary file modified src/onepassword/lib/x86_64/op_uniffi_core.dll
Binary file not shown.
3 changes: 1 addition & 2 deletions src/onepassword/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

## test resolve function


# valid
@pytest.mark.asyncio
async def test_valid_resolve():
Expand All @@ -18,7 +17,7 @@ async def test_valid_resolve():
integration_version=onepassword_defaults.DEFAULT_INTEGRATION_VERSION,
)
result = await client.secrets.resolve(
secret_reference="op://gowwbvgow7kxocrfmfvtwni6vi/6ydrn7ne6mwnqc2prsbqx4i4aq/password"
secret_reference="op://bhld6zk6hkuntyqlsjy3bdawey/jrtghaxr4hybspesgij35g5myy/password"
)
assert result == "test_password_42"

Expand Down
21 changes: 14 additions & 7 deletions src/release/RELEASE-NOTES
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# 1Password Python SDK v0.2.0
# Release notes SDKs 0.5.0

## NEW

- **File Support:** You can now create Document items, attach files to items, delete files from items, and read file contents using the SDK.
- ** and item metadata:** Items and item overviews ****now expose attributes with their creation and last edit times**.**
- **Resolving secrets in bulk**: With the function, the SDK is now able to resolve multiple secrets at once, improving the performance of the operation.

## IMPROVED

- **Read files using secret references**: You can now resolve secret references that point to files attached to 1Password items.
- **Read SSH keys in Open SSH format**: You can now use a secret reference to fetch a private key in OpenSSH format. For example: `op://vault/<SSH item>/private key?ssh-format=openssh`
- **Support for more item field types**: You can now create, retrieve, and edit items containing SSH keys, Month-Year and Menu-type fields using the SDK.
- **Read more field types using secret references**: You can now resolve secret references that point to information stored in Date, Month/Year, Address, and Reference field types.
- **Improved error messages**: The error messages returned by the SDK were improved to be more clear and actionable.
- **Support for new field types:** Items with and fields can now be created, retrieved, and edited using the 1Password SDK.
- **Item sharing for attachments and documents**: Items with files attached can now be shared.
- **Adding custom fields in sections automatically**: If a custom field has no specified section, the SDKs now automatically add the custom field to an empty section within the item, creating it if necessary.
- ** in item overviews**: The return type of now also contains the item tags.
- **Broader item editing capabilities**: You can now use the items.put function with more item types, including those with fields that are not directly editable through the SDK, like legacy fields, or passkeys.

## FIXED

- **Improvements to resolving secret references:**
- Archived items are no longer used for secret references.
- When multiple sections match a section query when resolving secret references, the SDKs now look through the fields in all matching sections instead of erroring.
2 changes: 1 addition & 1 deletion src/release/scripts/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ macOS_version_x86_64=10.9
macOS_version_arm64=11.0

# Extracts the current verison number for cleanup function
current_version=$(awk -F "['\"]" '/SDK_VERSION =/{print $2}' "$output_version_file")
current_version=$(cat version.txt)

# Function to execute upon exit
cleanup() {
Expand Down
Loading