diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..df4e37e --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,33 @@ +# .github/workflows/publish.yml +name: Publish python package +on: push +jobs: + pypi-publish: + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + name: Upload release to PyPI + runs-on: ubuntu-latest + environment: + name: release + url: https://pypi.org/p/interface-gen + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + steps: + - name: Check out source repository + uses: actions/checkout@v4 + - name: Set up Python environment + uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: Install twine and build + working-directory: . + run: | + python --version + pip --version + pip install build + pip install twine + - name: Build package distributions + working-directory: . + run: python -m build + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/dist-readme.md b/dist-readme.md index b1d7ce3..0b7bd44 100644 --- a/dist-readme.md +++ b/dist-readme.md @@ -46,7 +46,7 @@ ifgen -i -p my-protocols -o my-output For more details see the source code docs: -- Python [interface\_gen/README.md](interface_gen/README.md) +- Python [interface\_gen/README.md](https://github.com/getditto/interface_gen/blob/main/README.md) - Main [README.md](https://github.com/getditto/interface-gen/blob/main/README.md) - The [code repostitory](https://github.com/getditto/interface-gen) diff --git a/pyproject.toml b/pyproject.toml index 17a72e3..37470fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "interface_gen" -version = "0.0.13" +version = "0.0.18" authors = [ { name="Aaron Fabbri", email="aaron.fabbri@ditto.live" }, ]