fix(ci): fix YAML parse error in publish.yml (unindented closing pare… #35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: release-please | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| releases_created: ${{ steps.release.outputs.releases_created }} | |
| steps: | |
| - uses: googleapis/release-please-action@v4 | |
| id: release | |
| with: | |
| config-file: release-please-config.json | |
| manifest-file: .release-please-manifest.json | |
| publish: | |
| needs: release-please | |
| if: needs.release-please.outputs.releases_created == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Publish workspace crates in dependency order | |
| run: | | |
| # Dependency order: leaves first, umbrella last. | |
| # Topo-sorted from the workspace dependency graph. | |
| CRATES=( | |
| layer0 | |
| neuron-tool | |
| neuron-secret | |
| neuron-crypto | |
| neuron-hooks | |
| neuron-hook-security | |
| neuron-state-memory | |
| neuron-state-fs | |
| neuron-orch-kit | |
| neuron-orch-local | |
| neuron-turn | |
| neuron-auth | |
| neuron-context | |
| neuron-secret-env | |
| neuron-secret-keystore | |
| neuron-env-local | |
| neuron-mcp | |
| neuron-op-single-shot | |
| neuron-auth-static | |
| neuron-auth-file | |
| neuron-auth-oidc | |
| neuron-auth-k8s | |
| neuron-crypto-vault | |
| neuron-crypto-hardware | |
| neuron-secret-vault | |
| neuron-secret-aws | |
| neuron-secret-gcp | |
| neuron-secret-k8s | |
| neuron-op-react | |
| neuron-provider-anthropic | |
| neuron-provider-openai | |
| neuron-provider-ollama | |
| neuron | |
| ) | |
| for crate in "${CRATES[@]}"; do | |
| echo "::group::$crate" | |
| PUBLISHED=false | |
| for attempt in 1 2 3; do | |
| OUTPUT=$(cargo publish -p "$crate" --no-verify 2>&1) && { | |
| echo "Published $crate successfully" | |
| PUBLISHED=true | |
| break | |
| } | |
| if echo "$OUTPUT" | grep -qE "already uploaded|already exists"; then | |
| echo "$crate already published, skipping" | |
| PUBLISHED=true | |
| break | |
| fi | |
| if [ "$attempt" -lt 3 ]; then | |
| echo "Attempt $attempt failed, waiting 30s for index propagation..." | |
| echo "$OUTPUT" | |
| sleep 30 | |
| fi | |
| done | |
| echo "::endgroup::" | |
| if [ "$PUBLISHED" = "false" ]; then | |
| echo "$OUTPUT" | |
| echo "::error::Failed to publish $crate after 3 attempts" | |
| exit 1 | |
| fi | |
| sleep 10 | |
| done | |
| echo "All crates published successfully" | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |