From ca20132340fb81d4bb0305c50a52554789584add Mon Sep 17 00:00:00 2001 From: fernando_jacob Date: Fri, 13 Mar 2026 13:30:44 +0800 Subject: [PATCH] Release 0.2.0: bump version, update changelog, add release workflow Bump version to 0.2.0 with new features (10 AI tools, video frame watermark analysis, MP4 SEI markers). Add GitHub Actions workflow that auto-publishes to crates.io on minor/major version bumps. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yml | 79 +++++++++++++++++++++++++++++++++++ CHANGELOG.md | 2 + Cargo.lock | 2 +- Cargo.toml | 2 +- 4 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..74eae4c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,79 @@ +name: Release + +on: + push: + branches: [main] + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Read version from Cargo.toml + id: version + run: | + VERSION=$(grep -m1 '^version' Cargo.toml | sed 's/.*"\(.*\)".*/\1/') + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + echo "Detected version: $VERSION" + + - name: Check if release is needed + id: check + run: | + VERSION="${{ steps.version.outputs.version }}" + PATCH=$(echo "$VERSION" | cut -d. -f3) + TAG="v$VERSION" + + if [ "$PATCH" != "0" ]; then + echo "Patch version is $PATCH (not 0) -- skipping release." + echo "should_release=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + + if git rev-parse "$TAG" >/dev/null 2>&1; then + echo "Tag $TAG already exists -- skipping release." + echo "should_release=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + + echo "Will release $TAG" + echo "should_release=true" >> "$GITHUB_OUTPUT" + echo "tag=$TAG" >> "$GITHUB_OUTPUT" + + - name: Extract changelog for this version + if: steps.check.outputs.should_release == 'true' + id: changelog + run: | + VERSION="${{ steps.version.outputs.version }}" + awk "/^## \\[$VERSION\\]/{found=1; next} /^## \\[/{if(found) exit} found{print}" CHANGELOG.md > /tmp/release-notes.md + echo "Extracted changelog:" + cat /tmp/release-notes.md + + - name: Create git tag + if: steps.check.outputs.should_release == 'true' + run: | + git tag "${{ steps.check.outputs.tag }}" + git push origin "${{ steps.check.outputs.tag }}" + + - name: Create GitHub Release + if: steps.check.outputs.should_release == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create "${{ steps.check.outputs.tag }}" \ + --title "${{ steps.check.outputs.tag }}" \ + --notes-file /tmp/release-notes.md + + - uses: dtolnay/rust-toolchain@stable + if: steps.check.outputs.should_release == 'true' + + - name: Publish to crates.io + if: steps.check.outputs.should_release == 'true' + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + run: cargo publish diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b7a82e..a465e0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.2.0] - 2026-03-13 + ### Added - 10 new AI tool recognitions: Grok, Gemini, Jimeng (即梦), Luma, Hailuo (海螺), Pixverse, Genmo, Haiper, Hume, Fish Audio (51 → 61 tools) diff --git a/Cargo.lock b/Cargo.lock index 3d6215c..4069fe6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -38,7 +38,7 @@ dependencies = [ [[package]] name = "aicheck" -version = "0.1.0" +version = "0.2.0" dependencies = [ "anyhow", "assert_cmd", diff --git a/Cargo.toml b/Cargo.toml index 33e2963..16ff0d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aicheck" -version = "0.1.0" +version = "0.2.0" edition = "2021" rust-version = "1.86" description = "Detect AI-generated content via provenance signals (C2PA, XMP/IPTC, EXIF)"