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
12 changes: 10 additions & 2 deletions .github/workflows/publish-rust-report-crate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
tags:
- "rust/chainlink-data-streams-report-v*"
workflow_dispatch: # Keeping manual trigger as fallback
inputs:
version:
description: "Version to publish (e.g., 0.0.1)"
required: true

jobs:
publish:
Expand All @@ -21,9 +25,13 @@ jobs:
- name: Verify tag matches version
run: |
VERSION=$(grep '^version = "' rust/crates/report/Cargo.toml | cut -d '"' -f2)
TAG_VERSION=${GITHUB_REF#refs/tags/rust/chainlink-data-streams-report-v}
if [[ "${{ github.event_name }}" == "push" ]]; then
TAG_VERSION=${GITHUB_REF#refs/tags/rust/chainlink-data-streams-report-v}
else
TAG_VERSION=${{ github.event.inputs.version }}
fi
if [ "$VERSION" != "$TAG_VERSION" ]; then
echo "Version mismatch: Cargo.toml ($VERSION) != tag ($TAG_VERSION)"
echo "Version mismatch: Cargo.toml ($VERSION) != expected version ($TAG_VERSION)"
exit 1
fi

Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/publish-rust-sdk-crate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
tags:
- "rust/chainlink-data-streams-sdk-v*"
workflow_dispatch: # Keeping manual trigger as fallback
inputs:
version:
description: "Version to publish (e.g., 0.0.1)"
required: true

jobs:
publish:
Expand All @@ -21,9 +25,13 @@ jobs:
- name: Verify tag matches version
run: |
VERSION=$(grep '^version = "' rust/crates/sdk/Cargo.toml | cut -d '"' -f2)
TAG_VERSION=${GITHUB_REF#refs/tags/rust/chainlink-data-streams-sdk-v}
if [[ "${{ github.event_name }}" == "push" ]]; then
TAG_VERSION=${GITHUB_REF#refs/tags/rust/chainlink-data-streams-sdk-v}
else
TAG_VERSION=${{ github.event.inputs.version }}
fi
if [ "$VERSION" != "$TAG_VERSION" ]; then
echo "Version mismatch: Cargo.toml ($VERSION) != tag ($TAG_VERSION)"
echo "Version mismatch: Cargo.toml ($VERSION) != expected version ($TAG_VERSION)"
exit 1
fi

Expand Down