Skip to content

Commit

Permalink
chore: publish to PyPI on release (#101)
Browse files Browse the repository at this point in the history
* add gha to push wheel

* comment out build push

* turn off dynamic versioning

* bump version

* update poetry.lock

* add classifiers

* revert version, push to regular PyPI

* recomment build push docker

* upgrade asyncpg

* change version

* remove temp changes

---------

Co-authored-by: Nina Bernick <[email protected]>
  • Loading branch information
ninabernick and Nina Bernick authored Aug 26, 2024
1 parent 48fb829 commit 56cab4c
Show file tree
Hide file tree
Showing 5 changed files with 1,753 additions and 1,652 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and push docker image
name: Build and push docker image and package

on:
release:
Expand All @@ -10,7 +10,11 @@ jobs:
build-and-push:
name: Build and push docker image
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/${{ github.repository }}
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -48,3 +52,7 @@ jobs:
tags: |
ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}
ghcr.io/${{ github.repository }}:latest
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ The libraries and tools that make Platformics work:
5. Run `make token` to generate an authorization token that you can use to interact with the API. The `make` target copies the necessary headers to the system clipboard. Paste the token into the `headers` section at the bottom of the GraphQL explorer API

## Versioning platformics
Right now, platformics is used in downstream applications by using the platformics image as the base Docker image. To select a version of platformics, add the appropriate version tags to the docker image. The version in `pyproject.toml` is managed using [poetry-dynamic-versioning](https://pypi.org/project/poetry-dynamic-versioning/) which determines version based on git tags.
Platformics can be used in downstream applications by
1) using the platformics image as the base Docker image. To select a version of platformics, add the appropriate version tags to the docker image
2) installing as a dependency, `pip install platformics`.

The version in `pyproject.toml` is managed using [poetry-dynamic-versioning](https://pypi.org/project/poetry-dynamic-versioning/) which determines version based on git tags.

## Iterating on your schema
1. Make changes to `schema/schema.yml`
Expand Down
Loading

0 comments on commit 56cab4c

Please sign in to comment.