Skip to content

Commit

Permalink
add gha to push wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
Nina Bernick committed Aug 23, 2024
1 parent 48fb829 commit ae44046
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
name: Build and push docker image
name: Build and push docker image and package

on:
release:
types:
- published
push:
branches:
- ninabernick/package
workflow_dispatch:

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 @@ -44,7 +51,13 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
push: true
# push: true #TODO add back
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
with:
repository-url: https://test.pypi.org/legacy/ #TODO remove when ready to publish

10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
name = "platformics"
# placeholder version that will be replace by poetry-dynamic-versioning
version = "0.1.1"
description = "Platformics bio entities framework"
authors = ["CZI Infectious Disease Team <[email protected]>"]
description = "Codegen Python GraphQL Entity Framework"
authors = ["CZI Team <[email protected]>"]
license = "MIT License"
readme = "README.md"
packages = [{include = "platformics"}]
# requires-python = ">=3.12"
repository = "https://github.com/chanzuckerberg/platformics"
# todo add classifiers

[tool.poetry.scripts]
platformics = 'platformics.cli.main:cli'
Expand All @@ -30,8 +33,7 @@ httpx = "^0.24.1"
[tool.poetry.dependencies]
python = "^3.12"
fastapi = "^0.110.0"
# biopython 1.83 fails installation on m1 macs. The issue is fixed upstream so we're pinning to a specific commit until the next release.
biopython = { git = "https://github.com/biopython/biopython.git", rev = "e0731edc892b653dee10b1f68acf795086e6f3f0" }
biopython = "^1.84"
asyncpg = "^0.28.0"
alembic = "^1.11.1"
sgqlc = "^16.3"
Expand Down

0 comments on commit ae44046

Please sign in to comment.