name: "Publish Rust SDK"
on:
  push:
    tags: ["sdk/rust/v**"]
jobs:
  publish:
    if: github.repository == 'dagger/dagger'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-go@v3
        with:
          go-version: "1.21"
      - run: ./hack/make sdk:rust:publish ${{ github.ref_name }}
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
          CARGO_PUBLISH_DRYRUN: "false"
          DAGGER_CLOUD_TOKEN: ${{ secrets.DAGGER_CLOUD_TOKEN }}
