Skip to content

Commit 4520abf

Browse files
committed
chore(sdk/python): bump to 0.5.4b0 for release workflow testing
1 parent 151d384 commit 4520abf

8 files changed

Lines changed: 50 additions & 12 deletions

File tree

.github/workflows/js-sdk-release.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020

2121
permissions:
2222
id-token: write
23-
contents: read
23+
contents: write
2424

2525
jobs:
2626
publish:
@@ -74,12 +74,13 @@ jobs:
7474
- name: Determine npm dist-tag
7575
id: tag
7676
run: |
77+
VERSION="${GITHUB_REF_NAME#js-sdk-v}"
78+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
7779
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
7880
echo "tag=${{ github.event.inputs.npm_tag }}" >> "$GITHUB_OUTPUT"
7981
else
8082
# auto-detect from git tag: js-sdk-v0.5.8-beta.1 -> beta
81-
RAW_TAG="${GITHUB_REF_NAME}"
82-
if echo "$RAW_TAG" | grep -qiE '(beta|alpha|rc|preview)'; then
83+
if echo "$VERSION" | grep -qiE '(beta|alpha|rc|preview)'; then
8384
echo "tag=beta" >> "$GITHUB_OUTPUT"
8485
else
8586
echo "tag=latest" >> "$GITHUB_OUTPUT"
@@ -92,3 +93,19 @@ jobs:
9293
NPM_TAG="${{ steps.tag.outputs.tag }}"
9394
echo "Publishing with dist-tag: $NPM_TAG"
9495
npm publish --access public --provenance --tag "$NPM_TAG"
96+
97+
- name: GitHub Release
98+
if: github.event_name == 'push'
99+
uses: softprops/action-gh-release@v1
100+
with:
101+
name: "JS SDK v${{ steps.tag.outputs.version }}"
102+
body: |
103+
## npm Package
104+
105+
**Package**: `@phala/dstack-sdk@${{ steps.tag.outputs.version }}`
106+
107+
**Install**: `npm install @phala/dstack-sdk@${{ steps.tag.outputs.version }}`
108+
109+
**Dist-tag**: `${{ steps.tag.outputs.tag }}`
110+
111+
**Registry**: https://www.npmjs.com/package/@phala/dstack-sdk/v/${{ steps.tag.outputs.version }}

.github/workflows/python-sdk-release.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919

2020
permissions:
2121
id-token: write
22-
contents: read
22+
contents: write
2323

2424
jobs:
2525
publish:
@@ -38,6 +38,10 @@ jobs:
3838
working-directory: sdk/python
3939
run: pdm build
4040

41+
- name: Parse version
42+
id: version
43+
run: echo "version=${GITHUB_REF_NAME#python-sdk-v}" >> "$GITHUB_OUTPUT"
44+
4145
- name: Publish to PyPI
4246
if: github.event_name == 'push' || github.event.inputs.target == 'pypi'
4347
uses: pypa/gh-action-pypi-publish@release/v1
@@ -50,3 +54,17 @@ jobs:
5054
with:
5155
repository-url: https://test.pypi.org/legacy/
5256
packages-dir: sdk/python/dist
57+
58+
- name: GitHub Release
59+
if: github.event_name == 'push'
60+
uses: softprops/action-gh-release@v1
61+
with:
62+
name: "Python SDK v${{ steps.version.outputs.version }}"
63+
body: |
64+
## PyPI Package
65+
66+
**Package**: `dstack-sdk ${{ steps.version.outputs.version }}`
67+
68+
**Install**: `pip install dstack-sdk==${{ steps.version.outputs.version }}`
69+
70+
**Registry**: https://pypi.org/project/dstack-sdk/${{ steps.version.outputs.version }}/

sdk/js/.claude/settings.local.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
],
1818
"deny": []
1919
}
20-
}
20+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SPDX-FileCopyrightText: © 2025 Phala Network <dstack@phala.network>
2+
3+
SPDX-License-Identifier: Apache-2.0

sdk/js/src/encrypt-env-vars.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ export async function encryptEnvVars(envs: EnvVar[], publicKeyHex: string) {
6464
result.set(new Uint8Array(encrypted), publicKey.length + iv.length);
6565

6666
return uint8ArrayToHex(result);
67-
}
67+
}

sdk/js/tsconfig.browser.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
},
1212
"include": [
1313
"src/encrypt-env-vars.browser.ts",
14-
"src/get-compose-hash.browser.ts",
14+
"src/get-compose-hash.browser.ts",
1515
"src/verify-env-encrypt-public-key.browser.ts"
1616
],
1717
"exclude": ["node_modules", "**/*.test.ts"]
18-
}
18+
}

sdk/js/tsconfig.node.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
},
1212
"include": ["src/**/*"],
1313
"exclude": ["node_modules", "**/*.test.ts", "src/*.browser.ts"]
14-
}
14+
}

sdk/python/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[project]
66
name = "dstack-sdk"
7-
version = "0.5.3"
7+
version = "0.5.4b0"
88
description = "dstack SDK for Python"
99
authors = [
1010
{name = "Leechael Yim", email = "yanleech@gmail.com"},
@@ -103,7 +103,7 @@ repository = "pypi"
103103
fmt = {composite = ["ruff format src/ tests/", "ruff check --fix src/ tests/"]}
104104
format = {composite = ["ruff format src/ tests/", "ruff check --fix src/ tests/"]}
105105

106-
# Linting scripts
106+
# Linting scripts
107107
lint = {composite = ["ruff check src/ tests/", "mypy src/"]}
108108
check = {composite = ["ruff check src/ tests/", "ruff format --check src/ tests/", "mypy src/"]}
109109

@@ -134,4 +134,4 @@ solana = [
134134
]
135135
ethereum = [
136136
"web3",
137-
]
137+
]

0 commit comments

Comments
 (0)