Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,21 +359,28 @@ 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: Publish
environment: pypipublish
needs: [linux, windows, macos_x86, macos_aarch64, sdist]
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
name: wheels
path: dist
merge-multiple: true
- name: List contents of dist directory
run: ls -la dist/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably don't need this now that it works, but I think I'd leave it in anyway, just to be sure

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. We can remove it in subsequent PRs. And you're right, it's nice to have here to see what goes in.

- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.caipypi }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
command: upload
args: --non-interactive --skip-existing *
packages-dir: dist
# verbose: true
# print-hash: true
# Uncomment below for test runs, otherwise fails on existing packages being reuploaded
skip-existing: true

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "c2pa-python"
version = "0.8.2"
version = "0.9.0"
edition = "2021"
authors = ["Gavin Peacock <[email protected]"]

Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -27,4 +27,7 @@ urls = {homepage = "https://contentauthenticity.org", repository = "https://gith
[project.optional-dependencies]
test = [
"pytest < 5.0.0"
]
]

[tool.maturin]
module-name = "c2pa"
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def getitem(d, key):

class TestC2paSdk(unittest.TestCase):
def test_version(self):
assert version() == "0.8.2"
assert version() == "0.9.0"

def test_sdk_version(self):
assert "c2pa-rs/" in sdk_version()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

class TestC2paSdk(unittest.TestCase):
def test_version(self):
self.assertIn("0.8.2", sdk_version())
self.assertIn("0.9.0", sdk_version())


class TestReader(unittest.TestCase):
Expand Down
Loading