|
1 | | -# SPDX-FileCopyrightText: © 2025 Phala Network <dstack@phala.network> |
| 1 | +# SPDX-FileCopyrightText: © 2026 Phala Network <dstack@phala.network> |
2 | 2 | # |
3 | 3 | # SPDX-License-Identifier: Apache-2.0 |
4 | 4 |
|
5 | | -name: Publish SDK to crates.io |
| 5 | +name: Release-plz |
| 6 | + |
6 | 7 | on: |
7 | 8 | push: |
8 | | - tags: ['rust-sdk-v*'] |
| 9 | + branches: |
| 10 | + - master |
| 11 | + |
9 | 12 | jobs: |
10 | | - publish: |
| 13 | + release-plz-pr: |
| 14 | + name: Release-plz PR |
11 | 15 | runs-on: ubuntu-latest |
| 16 | + if: ${{ github.repository_owner == 'Dstack-TEE' }} |
| 17 | + permissions: |
| 18 | + contents: write |
| 19 | + pull-requests: write |
| 20 | + concurrency: |
| 21 | + group: release-plz-${{ github.ref }} |
| 22 | + cancel-in-progress: false |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v5 |
| 25 | + with: |
| 26 | + fetch-depth: 0 |
| 27 | + persist-credentials: false |
| 28 | + - uses: dtolnay/rust-toolchain@stable |
| 29 | + - name: Run release-plz |
| 30 | + uses: release-plz/action@v0.5 |
| 31 | + with: |
| 32 | + command: release-pr |
| 33 | + env: |
| 34 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 35 | + |
| 36 | + release-plz-release: |
| 37 | + name: Release-plz release |
| 38 | + runs-on: ubuntu-latest |
| 39 | + if: ${{ github.repository_owner == 'Dstack-TEE' }} |
12 | 40 | environment: sdk-release |
13 | 41 | permissions: |
| 42 | + contents: write |
| 43 | + pull-requests: read |
14 | 44 | id-token: write |
15 | 45 | steps: |
16 | | - - uses: actions/checkout@v5 |
17 | | - - uses: rust-lang/crates-io-auth-action@v1 |
18 | | - id: auth |
19 | | - - run: cargo publish -p dstack-sdk-types |
20 | | - env: |
21 | | - CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} |
22 | | - - run: cargo publish -p dstack-sdk |
23 | | - env: |
24 | | - CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} |
25 | | - |
| 46 | + - uses: actions/checkout@v5 |
| 47 | + with: |
| 48 | + fetch-depth: 0 |
| 49 | + persist-credentials: false |
| 50 | + - uses: dtolnay/rust-toolchain@stable |
| 51 | + - name: Run release-plz |
| 52 | + uses: release-plz/action@v0.5 |
| 53 | + with: |
| 54 | + command: release |
| 55 | + env: |
| 56 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments