Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
33 changes: 26 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
dry_run:
description: 'Dry run (do not actually publish)'
required: false
default: 'true'
default: true
type: boolean

env:
Expand Down Expand Up @@ -62,16 +62,35 @@ jobs:
- name: Cache cargo
uses: Swatinem/rust-cache@v2

- name: Verify crate can be packaged
run: cargo package -p aptos-sdk --allow-dirty
- name: Verify crates can be packaged
run: |
cargo package -p aptos-sdk-macros --locked
cargo package -p aptos-sdk --locked

# Publish macros crate first (aptos-sdk depends on it)
- name: Publish aptos-sdk-macros (dry run)
if: inputs.dry_run == true
run: cargo publish -p aptos-sdk-macros --locked --dry-run

- name: Publish aptos-sdk-macros
if: inputs.dry_run != true || github.event_name == 'push'
run: cargo publish -p aptos-sdk-macros --locked
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

# Wait for crates.io to index the macros crate (120s for reliability during high load)
- name: Wait for crates.io indexing
if: inputs.dry_run != true || github.event_name == 'push'
run: sleep 120

# Publish main SDK crate
- name: Publish aptos-sdk (dry run)
if: github.event.inputs.dry_run == 'true'
run: cargo publish -p aptos-sdk --dry-run
if: inputs.dry_run == true
run: cargo publish -p aptos-sdk --locked --dry-run

- name: Publish aptos-sdk
if: github.event.inputs.dry_run != 'true' || github.event_name == 'push'
run: cargo publish -p aptos-sdk
if: inputs.dry_run != true || github.event_name == 'push'
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition logic for publishing the SDK crate appears problematic. When triggered via workflow_dispatch with dry_run=false, the condition inputs.dry_run != true || github.event_name == 'push' will be true (because inputs.dry_run is false), so it will attempt to publish. However, when triggered via tag push, inputs.dry_run will be undefined/null in the push event context. In GitHub Actions, comparing undefined values with booleans can have unexpected behavior. Consider using fromJSON(inputs.dry_run || 'false') or checking github.event_name == 'push' first to ensure the condition works correctly in both trigger scenarios.

Copilot uses AI. Check for mistakes.
run: cargo publish -p aptos-sdk --locked
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

Expand Down
94 changes: 78 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ rust-version = "1.90.0"
# Internal crate dependencies.
# Please do not add any test features here: they should be declared by the individual crate.
aptos-sdk = { path = "crates/aptos-sdk" }
aptos-sdk-macros = { path = "crates/aptos-sdk-macros" }
aptos-sdk-macros = { version = "0.1.0", path = "crates/aptos-sdk-macros" }

# External crate dependencies.
# Please do not add any test features here: they should be declared by the individual crate.
Expand Down
2 changes: 1 addition & 1 deletion crates/aptos-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ p256 = { version = "0.13", features = ["ecdsa", "sha256", "std"], optional = tru
blst = { version = "0.3", optional = true }

# Optional keyless dependencies
jsonwebtoken = { version = "9.3", optional = true }
jsonwebtoken = { version = "10.3", features = ["aws_lc_rs"], optional = true }

# Optional indexer dependencies
graphql_client = { version = "0.14", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/aptos-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Add to your `Cargo.toml`:

```toml
[dependencies]
aptos-sdk = "0.1"
aptos-sdk = "0.3"
```

Basic usage:
Expand Down
Loading
Loading