Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
59 changes: 45 additions & 14 deletions .github/workflows/rust-sdk-release.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,56 @@
# SPDX-FileCopyrightText: © 2025 Phala Network <dstack@phala.network>
# SPDX-FileCopyrightText: © 2026 Phala Network <dstack@phala.network>
#
# SPDX-License-Identifier: Apache-2.0

name: Publish SDK to crates.io
name: Release-plz

on:
push:
tags: ['rust-sdk-v*']
branches:
- master

jobs:
publish:
release-plz-pr:
name: Release-plz PR
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'Dstack-TEE' }}
permissions:
contents: write
pull-requests: write
concurrency:
group: release-plz-${{ github.ref }}
cancel-in-progress: false
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: release-plz/action@v0.5
with:
command: release-pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release-plz-release:
name: Release-plz release
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'Dstack-TEE' }}
environment: sdk-release
permissions:
contents: write
pull-requests: read
id-token: write
steps:
- uses: actions/checkout@v5
- uses: rust-lang/crates-io-auth-action@v1
id: auth
- run: cargo publish -p dstack-sdk-types
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
- run: cargo publish -p dstack-sdk
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

- uses: actions/checkout@v5
with:
fetch-depth: 0
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: release-plz/action@v0.5
with:
command: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 21 additions & 0 deletions release-plz.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SPDX-FileCopyrightText: © 2026 Phala Network <dstack@phala.network>
#
# SPDX-License-Identifier: Apache-2.0

# release-plz only manages the public SDK crates. Every other workspace
# member is internal and must never be published to crates.io.

[workspace]
release = false
pr_branch_prefix = "release-plz/"
pr_labels = ["release"]
semver_check = true
changelog_update = true

[[package]]
name = "dstack-sdk-types"
release = true

[[package]]
name = "dstack-sdk"
release = true
Loading