c2pa-rs

A fork of https://github.com/contentauth/c2pa-rs/
git clone git://archive.git.mtrnord.blog/mtrnords-photography-manager/c2pa-rs.git
Log | Files | Refs | README

commit 992968f1f8e63f2818bd95d1ef82af50e46eaab2
parent e7594c27135d112c8d8822e1b2576a08f5408604
Author: Eric Scouten <scouten@adobe.com>
Date:   Thu, 15 Sep 2022 16:36:22 -0700

(IGNORE) Restore cargo-semver-checks step (#129)

Reverts #126 now that new version of crate is available.
Diffstat:
M.github/workflows/ci.yml | 111++++++++++++++++++++++++++++++++++++++-----------------------------------------
1 file changed, 54 insertions(+), 57 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml @@ -241,61 +241,58 @@ jobs: version: latest args: --all-targets --all-features - # TODO: Restore when https://github.com/obi1kenobi/cargo-semver-check/issues/122 - # is fixed. - - # version_bump: - # name: Ensure (MINOR) tag is used when making an API breaking change - # # Change all of these steps to (MAJOR) after 1.0 release - # runs-on: ubuntu-latest - # steps: - # - name: Checkout repository - # uses: actions/checkout@v3 - # if: ${{ !contains(github.event.pull_request.title, '(MINOR)') }} + version_bump: + name: Ensure (MINOR) tag is used when making an API breaking change + # Change all of these steps to (MAJOR) after 1.0 release + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + if: ${{ !contains(github.event.pull_request.title, '(MINOR)') }} - # - name: Install Rust toolchain - # uses: actions-rs/toolchain@v1 - # if: ${{ !contains(github.event.pull_request.title, '(MINOR)') }} - # with: - # toolchain: stable - # override: true - - # - name: Get latest existing tag - # uses: actions-ecosystem/action-get-latest-tag@v1 - # if: ${{ !contains(github.event.pull_request.title, '(MINOR)') }} - # id: get-latest-tag - # with: - # semver_only: true - - # - name: Set new version - # uses: paulhatch/semantic-version@v4.0.2 - # id: set-version - # if: ${{ !contains(github.event.pull_request.title, '(MINOR)') }} - # with: - # tag_prefix: "v" - # format: "${major}.${minor}.${patch}" - # major_pattern: "(MAJORXXXX)" - # minor_pattern: "(MINORXXXX)" - - # - name: "Bump crate version (NOTE: Not pushed back to repo!)" - # if: ${{ !contains(github.event.pull_request.title, '(MINOR)') }} - # run: | - # sed -i "s/^version = \"[^\"]*\"$/version = \"$VERSION\"/;" sdk/Cargo.toml - # git config user.email "nobody@example.com" - # git config --global user.name "PR validation bot" - # git add . - # git commit -m "DO NOT PUSH BACK TO PR: Bump crate version" - # env: - # VERSION: ${{ steps.set-version.outputs.version }} - - # - name: Has (MINOR) tag been used in a previous commit? - # id: bump_exists - # if: ${{ !contains(github.event.pull_request.title, '(MINOR)') }} - # run: | - # git log --format="%s" ${{ steps.get-latest-tag.outputs.tag }}..HEAD | { grep "(MINOR)" || :; } - - # - name: If this step fails, change title of the PR to include (MINOR) tag - # uses: obi1kenobi/cargo-semver-checks-action@v1 - # if: ${{ steps.bump_exists.outputs.stdout == '' && !contains(github.event.pull_request.title, '(MINOR)') }} - # with: - # crate-name: c2pa + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + if: ${{ !contains(github.event.pull_request.title, '(MINOR)') }} + with: + toolchain: stable + override: true + + - name: Get latest existing tag + uses: actions-ecosystem/action-get-latest-tag@v1 + if: ${{ !contains(github.event.pull_request.title, '(MINOR)') }} + id: get-latest-tag + with: + semver_only: true + + - name: Set new version + uses: paulhatch/semantic-version@v4.0.2 + id: set-version + if: ${{ !contains(github.event.pull_request.title, '(MINOR)') }} + with: + tag_prefix: "v" + format: "${major}.${minor}.${patch}" + major_pattern: "(MAJORXXXX)" + minor_pattern: "(MINORXXXX)" + + - name: "Bump crate version (NOTE: Not pushed back to repo!)" + if: ${{ !contains(github.event.pull_request.title, '(MINOR)') }} + run: | + sed -i "s/^version = \"[^\"]*\"$/version = \"$VERSION\"/;" sdk/Cargo.toml + git config user.email "nobody@example.com" + git config --global user.name "PR validation bot" + git add . + git commit -m "DO NOT PUSH BACK TO PR: Bump crate version" + env: + VERSION: ${{ steps.set-version.outputs.version }} + + - name: Has (MINOR) tag been used in a previous commit? + id: bump_exists + if: ${{ !contains(github.event.pull_request.title, '(MINOR)') }} + run: | + git log --format="%s" ${{ steps.get-latest-tag.outputs.tag }}..HEAD | { grep "(MINOR)" || :; } + + - name: If this step fails, change title of the PR to include (MINOR) tag + uses: obi1kenobi/cargo-semver-checks-action@v1 + if: ${{ steps.bump_exists.outputs.stdout == '' && !contains(github.event.pull_request.title, '(MINOR)') }} + with: + crate-name: c2pa