cue-sdk 0.1.1

A high-level safe wrapper for the Corsair iCUE SDK v4.
Documentation
name: Publish

on:
  push:
    tags: ["v*"]

permissions:
  contents: write

jobs:
  publish:
    name: Release & Publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Extract release notes from CHANGELOG.md
        run: |
          version="${GITHUB_REF_NAME#v}"
          awk "/^## \\[v${version}\\]/{found=1; next} /^## \\[/{if(found) exit} found{print}" CHANGELOG.md > release_notes.md

      - name: Create GitHub Release
        env:
          GH_TOKEN: ${{ github.token }}
        run: |
          gh release create "$GITHUB_REF_NAME" \
            --title "$GITHUB_REF_NAME" \
            --notes-file release_notes.md

      - uses: dtolnay/rust-toolchain@stable

      - name: Publish to crates.io
        run: cargo publish --allow-dirty --token ${{ secrets.CRATES_TOKEN }}