From c180ead8e1b05be82a8eff099efdba026f46571f Mon Sep 17 00:00:00 2001 From: Gavin Peacock Date: Thu, 27 Mar 2025 13:45:22 -0700 Subject: [PATCH 01/24] chore: repair publishing process --- .github/workflows/build.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 90fbf91b..bcc5154a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -365,15 +365,14 @@ jobs: runs-on: ubuntu-latest environment: Publish needs: [linux, windows, macos_x86, macos_aarch64, sdist] + permissions: + # IMPORTANT: this permission is mandatory for Trusted Publishing + id-token: write steps: - uses: actions/download-artifact@v4 with: pattern: wheels-* name: wheels - name: Publish to PyPI - uses: PyO3/maturin-action@v1 - env: - MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} - with: - command: upload - args: --non-interactive --skip-existing * + uses: pypa/gh-action-pypi-publish@release/v1 + From 856dd1d7d851fa58ffc1791ec2d2c95dcbdeda50 Mon Sep 17 00:00:00 2001 From: Gavin Peacock Date: Thu, 27 Mar 2025 14:55:43 -0700 Subject: [PATCH 02/24] chore: update release workflow --- .github/workflows/build.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bcc5154a..35e99eb5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -369,10 +369,16 @@ jobs: # IMPORTANT: this permission is mandatory for Trusted Publishing id-token: write steps: + - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 with: pattern: wheels-* - name: wheels - - name: Publish to PyPI + path: dist + merge-multiple: true + - name: List contents of dist directory + run: ls -la dist/ + - name: Publish to PyPi uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages_dir: dist From 05a1a540667eae514f4a3cdb588f6ebd0454a472 Mon Sep 17 00:00:00 2001 From: Gavin Peacock Date: Thu, 27 Mar 2025 15:31:36 -0700 Subject: [PATCH 03/24] chore: yet another publish attempt --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 35e99eb5..4054a07f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -381,4 +381,6 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: packages_dir: dist + username: __token__ + password: ${{ secrets.PYPI_TOKEN }} From 28e6bab4362c0aa53ec378559beaefdc82867d54 Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 09:05:19 -0700 Subject: [PATCH 04/24] ci: Change setup --- .github/workflows/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4054a07f..59414fa6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -363,7 +363,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true' runs-on: ubuntu-latest - environment: Publish + environment: publish needs: [linux, windows, macos_x86, macos_aarch64, sdist] permissions: # IMPORTANT: this permission is mandatory for Trusted Publishing @@ -381,6 +381,4 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: packages_dir: dist - username: __token__ - password: ${{ secrets.PYPI_TOKEN }} From b04ae8f44338959ba135f69ae047ed15897cbd7f Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 10:58:13 -0700 Subject: [PATCH 05/24] fix: change settings --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 59414fa6..bfedd1ae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -381,4 +381,5 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: packages_dir: dist + project: c2pa From c43d2a0bf09909fa575c6ed6f221e1d1706de977 Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 11:17:35 -0700 Subject: [PATCH 06/24] fix: Make things verbose --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bfedd1ae..0951aaa8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -381,5 +381,5 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: packages_dir: dist - project: c2pa + verbose: true From a83ec203225c6b19ba7766d1afc4a56f45d7fa35 Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 11:32:44 -0700 Subject: [PATCH 07/24] fix: Debug release --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0951aaa8..d3d751f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build +name: build on: pull_request: From b9f1b04ba9f7af51ea30edd83fa9983ac746578c Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 11:51:54 -0700 Subject: [PATCH 08/24] fix: Deprecation --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3d751f6..0675670e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: build +name: Build on: pull_request: @@ -380,6 +380,6 @@ jobs: - name: Publish to PyPi uses: pypa/gh-action-pypi-publish@release/v1 with: - packages_dir: dist + packages-dir: dist verbose: true From 839ce33e21cee2bb31352f9982a471dc2c5b61c3 Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 12:46:18 -0700 Subject: [PATCH 09/24] fix: Rename env --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0675670e..cc00a9a7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build +name: build on: pull_request: @@ -363,7 +363,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true' runs-on: ubuntu-latest - environment: publish + environment: pypipublish needs: [linux, windows, macos_x86, macos_aarch64, sdist] permissions: # IMPORTANT: this permission is mandatory for Trusted Publishing From 1c97a07e0d5e2ddd35a7f6d7c99e57f3dd9d8dff Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 13:27:12 -0700 Subject: [PATCH 10/24] fix: Clean up --- .github/workflows/build.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cc00a9a7..29567094 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -359,14 +359,11 @@ jobs: release: name: Release - if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true' - runs-on: ubuntu-latest environment: pypipublish needs: [linux, windows, macos_x86, macos_aarch64, sdist] permissions: - # IMPORTANT: this permission is mandatory for Trusted Publishing id-token: write steps: - uses: actions/checkout@v4 @@ -377,7 +374,7 @@ jobs: merge-multiple: true - name: List contents of dist directory run: ls -la dist/ - - name: Publish to PyPi + - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: packages-dir: dist From 5061646de263888cdb31029cff58413d076f59af Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 13:52:39 -0700 Subject: [PATCH 11/24] fix: Logs --- .github/workflows/build.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 29567094..102f57db 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -374,9 +374,19 @@ jobs: merge-multiple: true - name: List contents of dist directory run: ls -la dist/ + - name: Debug OIDC token + run: | + echo "Checking OIDC token information..." + echo "GITHUB_TOKEN: ${{ github.token != '' }}" + echo "ACTIONS_ID_TOKEN_REQUEST_URL: ${{ env.ACTIONS_ID_TOKEN_REQUEST_URL != '' }}" + echo "ACTIONS_ID_TOKEN_REQUEST_TOKEN: ${{ env.ACTIONS_ID_TOKEN_REQUEST_TOKEN != '' }}" + echo "ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN != '' }}" + echo "ACTIONS_RUNTIME_URL: ${{ env.ACTIONS_RUNTIME_URL != '' }}" + echo "__token__ value: __token__" - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: packages-dir: dist verbose: true + print-hash: true From 0466c4acabe3457dbebe1f8f2aff3dcfcd687a8c Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 14:32:38 -0700 Subject: [PATCH 12/24] fix: Different name --- .github/workflows/build.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 102f57db..803b28de 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -374,15 +374,13 @@ jobs: merge-multiple: true - name: List contents of dist directory run: ls -la dist/ - - name: Debug OIDC token + - name: Debug environment run: | - echo "Checking OIDC token information..." - echo "GITHUB_TOKEN: ${{ github.token != '' }}" - echo "ACTIONS_ID_TOKEN_REQUEST_URL: ${{ env.ACTIONS_ID_TOKEN_REQUEST_URL != '' }}" - echo "ACTIONS_ID_TOKEN_REQUEST_TOKEN: ${{ env.ACTIONS_ID_TOKEN_REQUEST_TOKEN != '' }}" - echo "ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN != '' }}" - echo "ACTIONS_RUNTIME_URL: ${{ env.ACTIONS_RUNTIME_URL != '' }}" - echo "__token__ value: __token__" + echo "Environment name: ${{ github.event.inputs.environment }}" + echo "Workflow name: ${{ github.workflow }}" + echo "Repository: ${{ github.repository }}" + echo "Ref: ${{ github.ref }}" + echo "Event name: ${{ github.event_name }}" - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: From 311e45d10f79e07bb13648a48bd302cd3f3f644d Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 14:51:46 -0700 Subject: [PATCH 13/24] fix: Fix logs --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 803b28de..6415c123 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -365,6 +365,7 @@ jobs: needs: [linux, windows, macos_x86, macos_aarch64, sdist] permissions: id-token: write + contents: read steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 @@ -376,7 +377,7 @@ jobs: run: ls -la dist/ - name: Debug environment run: | - echo "Environment name: ${{ github.event.inputs.environment }}" + echo "Environment name: ${{ github.event.environment }}" echo "Workflow name: ${{ github.workflow }}" echo "Repository: ${{ github.repository }}" echo "Ref: ${{ github.ref }}" From 14ba1d77f0fca583dd0bdd30f979eefbc61b2040 Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 14:53:11 -0700 Subject: [PATCH 14/24] fix: Fix logs 2 --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6415c123..363d16fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -384,6 +384,10 @@ jobs: echo "Event name: ${{ github.event_name }}" - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 + env: + TWINE_VERBOSE: 1 + TWINE_DEBUG: 1 + PYTHONUNBUFFERED: 1 with: packages-dir: dist verbose: true From 0650e157129d13dd52b3a47f1cbf2b0f8a42f123 Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 14:53:41 -0700 Subject: [PATCH 15/24] fix: Fix logs 2 --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 363d16fd..2ce47a5e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -392,4 +392,5 @@ jobs: packages-dir: dist verbose: true print-hash: true + debug: true From 664f63f2266c7ee79da6ea4c5cd61d67a551c43b Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 14:59:15 -0700 Subject: [PATCH 16/24] fix: Fix namings --- pyproject.toml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5d973f29..ddd9fdaa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["maturin>=1.7.4,<2.0","uniffi_bindgen>=0.28,<0.30"] build-backend = "maturin" [project] -name = "c2pa" +name = "c2pa-python" dependencies = ["cffi"] requires-python = ">=3.7" description = "Python bindings for the C2PA Content Authenticity Initiative (CAI) library" @@ -27,4 +27,8 @@ urls = {homepage = "https://contentauthenticity.org", repository = "https://gith [project.optional-dependencies] test = [ "pytest < 5.0.0" -] \ No newline at end of file +] + +[tool.maturin] +python-source = "c2pa" +module-name = "c2pa" \ No newline at end of file From 6026f23fb3ee0179413a64ab43b27c2ba5f6a350 Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 15:19:41 -0700 Subject: [PATCH 17/24] fix: Fix namings 2 --- .github/workflows/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2ce47a5e..698fab0a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -391,6 +391,4 @@ jobs: with: packages-dir: dist verbose: true - print-hash: true - debug: true From 8b16c19c7416f884c474e1af14417a81e0a3fde7 Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 15:45:06 -0700 Subject: [PATCH 18/24] fix: Skip existing --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 698fab0a..ecb7da15 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -391,4 +391,6 @@ jobs: with: packages-dir: dist verbose: true + print-hash: true + skip-existing: true From 0fb4f451c6690416e5cdd5769f7ffc15f6d826fb Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 15:52:36 -0700 Subject: [PATCH 19/24] fix: Version bump --- Cargo.toml | 2 +- tests/test_api.py | 2 +- tests/test_unit_tests.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1de6c9b7..7df0a0b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "c2pa-python" -version = "0.8.0" +version = "0.8.4" edition = "2021" authors = ["Gavin Peacock Date: Wed, 7 May 2025 16:12:45 -0700 Subject: [PATCH 20/24] fix: Revert version number change --- Cargo.toml | 2 +- tests/test_api.py | 2 +- tests/test_unit_tests.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0d8617d4..dbe6163a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "c2pa-python" -version = "0.8.4" +version = "0.8.0" edition = "2021" authors = ["Gavin Peacock Date: Wed, 7 May 2025 16:39:56 -0700 Subject: [PATCH 21/24] fix: Naming --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ddd9fdaa..aed70ed3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,5 +30,4 @@ test = [ ] [tool.maturin] -python-source = "c2pa" module-name = "c2pa" \ No newline at end of file From 0ac8397ed42dc52d30fdeb182e4209a81ac269a1 Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 16:55:57 -0700 Subject: [PATCH 22/24] fix: Remove debug code --- .github/workflows/build.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ecb7da15..d35e91a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: build +name: Build on: pull_request: @@ -375,22 +375,12 @@ jobs: merge-multiple: true - name: List contents of dist directory run: ls -la dist/ - - name: Debug environment - run: | - echo "Environment name: ${{ github.event.environment }}" - echo "Workflow name: ${{ github.workflow }}" - echo "Repository: ${{ github.repository }}" - echo "Ref: ${{ github.ref }}" - echo "Event name: ${{ github.event_name }}" - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - env: - TWINE_VERBOSE: 1 - TWINE_DEBUG: 1 - PYTHONUNBUFFERED: 1 with: packages-dir: dist - verbose: true - print-hash: true - skip-existing: true + # verbose: true + # print-hash: true + # Uncomment below for test runs, otherwise fails on existing packages being reuploaded + # skip-existing: true From d2bd726de02c2f6c0852f59f1fcdfbf8d4d20a69 Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Wed, 7 May 2025 17:11:22 -0700 Subject: [PATCH 23/24] fix: skip existing set back to true --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d35e91a4..7876c18e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -382,5 +382,5 @@ jobs: # verbose: true # print-hash: true # Uncomment below for test runs, otherwise fails on existing packages being reuploaded - # skip-existing: true + skip-existing: true From eff33e280df46b5946b20906ddd8ff15150bd2f5 Mon Sep 17 00:00:00 2001 From: Tania Mathern Date: Thu, 8 May 2025 13:27:08 -0700 Subject: [PATCH 24/24] fix: Bump version --- Cargo.toml | 2 +- tests/test_api.py | 2 +- tests/test_unit_tests.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index dbe6163a..611ec309 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "c2pa-python" -version = "0.8.0" +version = "0.9.0" edition = "2021" authors = ["Gavin Peacock