-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github action for publishing on releases
- Loading branch information
1 parent
dcaf0d6
commit c2c251e
Showing
3 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# When a release is created on github, publish the groundlight package to our internal pypi repository | ||
# (Similar to https://github.com/positronix-ai/predictors/blob/main/.github/workflows/publish.yaml) | ||
name: publish package | ||
on: | ||
release: | ||
types: [created] | ||
jobs: | ||
publish-python-package: | ||
runs-on: ubuntu-latest | ||
env: | ||
INTERNAL_REPO_URL: https://positronix-723181461334.d.codeartifact.us-west-2.amazonaws.com/pypi/internal/ | ||
steps: | ||
- name: install python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: install poetry | ||
run: | | ||
pip install -U pip | ||
pip install poetry | ||
- name: configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-2 | ||
- name: get code | ||
uses: actions/checkout@v2 | ||
- name: build package | ||
run: poetry build | ||
- name: configure poetry and publish | ||
run: | | ||
export POETRY_HTTP_BASIC_INTERNAL_USERNAME=aws | ||
export POETRY_HTTP_BASIC_INTERNAL_PASSWORD=$(aws codeartifact get-authorization-token --domain positronix --query authorizationToken --output text) | ||
poetry config repositories.internal $INTERNAL_REPO_URL | ||
poetry publish -r internal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "groundlight" | ||
version = "0.1.1" | ||
version = "0.1.2" | ||
description = "Call the Groundlight API from python" | ||
authors = ["Groundlight AI <[email protected]>"] | ||
packages = [ | ||
|