Skip to content

Commit

Permalink
Publish foxglove-schemas-flatbuffer to PyPI (#88)
Browse files Browse the repository at this point in the history
**Public-Facing Changes**
- Publish flatbuffer package to PyPI (`pip install foxglove-schemas-flatbuffer`)
  • Loading branch information
jhurliman authored Feb 16, 2023
1 parent 95b3848 commit 02fcfbb
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 8 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,27 @@ jobs:
- run: make test
- run: make build

- name: Publish foxglove-schemas-flatbuffer to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
with:
user: __token__
password: ${{ secrets.TESTPYPI_API_TOKEN }}
packages_dir: python/foxglove-schemas-flatbuffer/dist
repository_url: https://test.pypi.org/legacy/
skip_existing: true

- name: Publish foxglove-schemas-flatbuffer to PyPI
if: |
!github.event.pull_request.head.repo.fork &&
github.actor != 'dependabot[bot]' &&
startsWith(github.ref, 'refs/tags/releases/python/foxglove-schemas-flatbuffer/v')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: python/foxglove-schemas-flatbuffer/dist

- name: Publish foxglove-schemas-protobuf to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
Expand Down
2 changes: 1 addition & 1 deletion python/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name = "pypi"
[packages]
flatbuffers = "*"
protobuf = "*"
foxglove-schemas-flatbuffers = {editable = true, path = "./foxglove-schemas-flatbuffer"}
foxglove-schemas-flatbuffer = {editable = true, path = "./foxglove-schemas-flatbuffer"}
foxglove-schemas-protobuf = {editable = true, path = "./foxglove-schemas-protobuf"}

[dev-packages]
Expand Down
6 changes: 1 addition & 5 deletions python/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion python/foxglove-schemas-flatbuffer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pipenv install foxglove-schemas-flatbuffer

## Usage

Import types from the `foxglove` module as follows:
Import types from the `foxglove_schemas_flatbuffer` module as follows:

```py
import flatbuffers
Expand Down
2 changes: 1 addition & 1 deletion python/foxglove-schemas-protobuf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pipenv install foxglove-schemas-protobuf

## Usage

Import types from the `foxglove` module as follows:
Import types from the `foxglove_schemas_protobuf` module as follows:

```py
from foxglove_schemas_protobuf.CompressedImage_pb2 import CompressedImage
Expand Down

0 comments on commit 02fcfbb

Please sign in to comment.