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
19 changes: 1 addition & 18 deletions .github/workflows/release-pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,5 @@ jobs:
with:
toolchain: stable

- name: Determine release type
id: release-type
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
if [[ "$PR_TITLE" == *"program-libs"* ]]; then
echo "type=program-libs" >> "$GITHUB_OUTPUT"
elif [[ "$PR_TITLE" == *"sdk-libs"* ]]; then
echo "type=sdk-libs" >> "$GITHUB_OUTPUT"
else
echo "Error: Could not determine release type from PR title: $PR_TITLE"
echo "PR title must contain 'program-libs' or 'sdk-libs'"
exit 1
fi

- name: Validate packages for publishing
env:
RELEASE_TYPE: ${{ steps.release-type.outputs.type }}
run: ./scripts/release/validate-packages.sh "$RELEASE_TYPE"
run: ./scripts/release/validate-packages.sh
33 changes: 7 additions & 26 deletions .github/workflows/release-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,6 @@ jobs:
git fetch origin "${{ github.event.pull_request.base.sha }}"
git fetch origin "${{ github.event.pull_request.head.sha }}"

- name: Determine release type
id: release-type
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
if [[ "$PR_TITLE" == *"program-libs"* ]]; then
echo "type=program-libs" >> "$GITHUB_OUTPUT"
elif [[ "$PR_TITLE" == *"sdk-libs"* ]]; then
echo "type=sdk-libs" >> "$GITHUB_OUTPUT"
else
echo "Error: Could not determine release type from PR title: $PR_TITLE"
echo "PR title must contain 'program-libs' or 'sdk-libs'"
exit 1
fi
echo "Detected release type: $(cat "$GITHUB_OUTPUT")"

- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
Expand All @@ -56,40 +40,37 @@ jobs:
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
RELEASE_TYPE: ${{ steps.release-type.outputs.type }}
run: |
echo "========================================="
echo "Phase 1: Validation (dry-run)"
echo "========================================="
./scripts/release/validate-packages.sh "$RELEASE_TYPE" "$BASE_SHA" "$HEAD_SHA"
./scripts/release/validate-packages.sh "$BASE_SHA" "$HEAD_SHA"

- name: Publish packages to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
RELEASE_TYPE: ${{ steps.release-type.outputs.type }}
run: |
echo ""
echo "========================================="
echo "Phase 2: Publishing (atomic)"
echo "========================================="
./scripts/release/validate-packages.sh --execute "$RELEASE_TYPE" "$BASE_SHA" "$HEAD_SHA"
./scripts/release/validate-packages.sh --execute "$BASE_SHA" "$HEAD_SHA"

- name: Create GitHub releases
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
RELEASE_TYPE: ${{ steps.release-type.outputs.type }}
run: |
echo ""
echo "========================================="
echo "Phase 3: Creating GitHub releases"
echo "========================================="

# Detect packages that were published
PACKAGES_STRING=$(./scripts/release/detect-version-changes.sh "$RELEASE_TYPE" "$BASE_SHA" "$HEAD_SHA")
PACKAGES_STRING=$(./scripts/release/detect-version-changes.sh "$BASE_SHA" "$HEAD_SHA")
read -ra PACKAGES <<< "$PACKAGES_STRING"

for pkg in "${PACKAGES[@]}"; do
Expand All @@ -102,11 +83,11 @@ jobs:

# Generate crate-specific release notes
if RELEASE_NOTES=$(./scripts/release/generate-release-notes.sh "$pkg" "$VERSION" 2>&1); then
echo "Generated release notes for $pkg"
echo "Generated release notes for $pkg"

# Create release with custom notes
if echo "$RELEASE_NOTES" | gh release create "$TAG" --title "$TAG" --notes-file -; then
echo "Created release for $TAG"
echo "Created release for $TAG"
else
echo "Warning: Failed to create release for $TAG"
fi
Expand All @@ -115,12 +96,12 @@ jobs:
echo "Warning: Could not generate crate-specific notes: $RELEASE_NOTES"
echo "Falling back to auto-generated notes"
if gh release create "$TAG" --generate-notes --title "$TAG"; then
echo "Created release for $TAG"
echo "Created release for $TAG"
else
echo "Warning: Failed to create release for $TAG"
fi
fi
done

echo ""
echo "GitHub releases created"
echo "GitHub releases created"
43 changes: 21 additions & 22 deletions Cargo.lock

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

42 changes: 21 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -187,22 +187,22 @@ light-hash-set = { version = "4.0.0", path = "program-libs/hash-set" }
light-indexed-merkle-tree = { version = "5.0.0", path = "program-libs/indexed-merkle-tree" }
light-concurrent-merkle-tree = { version = "5.0.0", path = "program-libs/concurrent-merkle-tree" }
light-sparse-merkle-tree = { version = "0.3.0", path = "sparse-merkle-tree" }
light-client = { path = "sdk-libs/client", version = "0.18.0" }
light-event = { path = "sdk-libs/event", version = "0.3.0" }
light-client = { path = "sdk-libs/client", version = "0.19.0" }
light-event = { path = "sdk-libs/event", version = "0.4.0" }
light-hasher = { path = "program-libs/hasher", version = "5.0.0", default-features = false }
light-macros = { path = "program-libs/macros", version = "2.2.0" }
light-merkle-tree-reference = { path = "program-tests/merkle-tree", version = "4.0.0" }
light-heap = { path = "program-libs/heap", version = "2.0.0" }
light-prover-client = { path = "prover/client", version = "5.0.1" }
light-sdk = { path = "sdk-libs/sdk", version = "0.18.0" }
light-sdk-pinocchio = { path = "sdk-libs/sdk-pinocchio", version = "0.18.0" }
light-sdk-macros = { path = "sdk-libs/macros", version = "0.18.1" }
light-sdk-types = { path = "sdk-libs/sdk-types", version = "0.18.0", default-features = false }
light-compressed-account = { path = "program-libs/compressed-account", version = "0.8.0", default-features = false }
light-compressible = { path = "program-libs/compressible", version = "0.3.1", default-features = false }
light-token-interface = { path = "program-libs/token-interface", version = "0.2.0" }
light-account-checks = { path = "program-libs/account-checks", version = "0.6.0", default-features = false }
light-verifier = { path = "program-libs/verifier", version = "7.0.0" }
light-prover-client = { path = "prover/client", version = "6.0.0" }
light-sdk = { path = "sdk-libs/sdk", version = "0.19.0" }
light-sdk-pinocchio = { path = "sdk-libs/sdk-pinocchio", version = "0.19.0" }
light-sdk-macros = { path = "sdk-libs/macros", version = "0.19.0" }
light-sdk-types = { path = "sdk-libs/sdk-types", version = "0.19.0", default-features = false }
light-compressed-account = { path = "program-libs/compressed-account", version = "0.9.0", default-features = false }
light-compressible = { path = "program-libs/compressible", version = "0.4.0", default-features = false }
light-token-interface = { path = "program-libs/token-interface", version = "0.3.0" }
light-account-checks = { path = "program-libs/account-checks", version = "0.7.0", default-features = false }
light-verifier = { path = "program-libs/verifier", version = "8.0.0" }
light-zero-copy = { path = "program-libs/zero-copy", version = "0.6.0", default-features = false }
light-zero-copy-derive = { path = "program-libs/zero-copy-derive", version = "0.6.0" }
photon-api = { path = "sdk-libs/photon-api", version = "0.54.0" }
Expand All @@ -214,8 +214,8 @@ account-compression = { path = "programs/account-compression", version = "2.0.0"
light-compressed-token = { path = "programs/compressed-token/program", version = "2.0.0", features = [
"cpi",
] }
light-token-types = { path = "sdk-libs/token-types", version = "0.3.0" }
light-token = { path = "sdk-libs/token-sdk", version = "0.3.0" }
light-token-types = { path = "sdk-libs/token-types", version = "0.4.0" }
light-token = { path = "sdk-libs/token-sdk", version = "0.4.0" }
light-token-client = { path = "sdk-libs/token-client", version = "0.1.0" }
light-system-program-anchor = { path = "anchor-programs/system", version = "2.0.0", features = [
"cpi",
Expand All @@ -227,18 +227,18 @@ light-registry = { path = "programs/registry", version = "2.0.0", features = [
create-address-test-program = { path = "program-tests/create-address-test-program", version = "1.0.0", features = [
"cpi",
] }
light-program-test = { path = "sdk-libs/program-test", version = "0.18.0" }
light-instruction-decoder = { path = "sdk-libs/instruction-decoder", version = "0.1.0" }
light-instruction-decoder-derive = { path = "sdk-libs/instruction-decoder-derive", version = "0.1.0" }
light-batched-merkle-tree = { path = "program-libs/batched-merkle-tree", version = "0.8.0" }
light-merkle-tree-metadata = { path = "program-libs/merkle-tree-metadata", version = "0.8.0" }
light-program-test = { path = "sdk-libs/program-test", version = "0.19.0" }
light-instruction-decoder = { path = "sdk-libs/instruction-decoder", version = "0.2.0" }
light-instruction-decoder-derive = { path = "sdk-libs/instruction-decoder-derive", version = "0.2.0" }
light-batched-merkle-tree = { path = "program-libs/batched-merkle-tree", version = "0.9.0" }
light-merkle-tree-metadata = { path = "program-libs/merkle-tree-metadata", version = "0.9.0" }
aligned-sized = { path = "program-libs/aligned-sized", version = "1.1.0" }
light-bloom-filter = { path = "program-libs/bloom-filter", version = "0.5.0" }
light-bloom-filter = { path = "program-libs/bloom-filter", version = "0.6.0" }
light-bounded-vec = { version = "2.0.1" }
light-poseidon = { version = "0.3.0" }
light-test-utils = { path = "program-tests/utils", version = "1.2.1" }
light-indexed-array = { path = "program-libs/indexed-array", version = "0.3.0" }
light-array-map = { path = "program-libs/array-map", version = "0.1.1" }
light-array-map = { path = "program-libs/array-map", version = "0.2.0" }
light-program-profiler = { version = "0.1.0" }
create-address-program-test = { path = "program-tests/create-address-test-program", version = "1.0.0" }
sdk-compressible-test = { path = "sdk-tests/sdk-compressible-test", version = "0.1.0" }
Expand Down
Loading
Loading