Prepare chainlink-data-streams-report crate for v1.0.1 release (#21) #7
Workflow file for this run
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: Publish Chainlink Data Streams Report Crate | |
| on: | |
| push: | |
| 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: | |
| runs-on: ubuntu-latest | |
| environment: publish | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Verify tag matches version | |
| run: | | |
| VERSION=$(grep '^version = "' rust/crates/report/Cargo.toml | cut -d '"' -f2) | |
| 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) != expected version ($TAG_VERSION)" | |
| exit 1 | |
| fi | |
| - name: Publish chainlink-data-streams-report | |
| run: | | |
| cd rust/crates/report | |
| cargo publish --token ${CARGO_DATA_STREAMS_SDK} | |
| if ! cargo owner --list | grep -q "github:smartcontractkit:RustCrates"; then | |
| cargo owner --add github:smartcontractkit:RustCrates | |
| fi | |
| env: | |
| CARGO_DATA_STREAMS_SDK: ${{ secrets.CARGO_DATA_STREAMS_SDK }} |