Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publish to pypi gx-cloud #31

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/publish-to-pypi-gx-cloud.yaml
Copy link
Member

@Kilo59 Kilo59 Oct 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this action know to publish to gx-cloud instead of great-expectations-cloud?

I'm wondering if we can keep 1 workflow but use a matrix for publishing to both.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My current understanding is that is authenticates via the mix of an org name, a repo name and the workflow that you specify. I chose to name it a different workflow for now in case there were collisions.

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: publish-to-pypi-gx-cloud

# TODO: Set this to manually trigger once we cutover and go live
on:
push:
branches:
- gx-cloud-pypi

jobs:
pypi-test-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
cache-dependency-path: poetry.lock

- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local # the path depends on the OS
key: poetry-0 # increment to reset cache

- name: Install Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1

- name: Install dependencies
run: poetry install --sync

- name: Build distributions
run: poetry build

# retrieve your distributions here
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
# TODO: remove this one we are publishing to pypy
# repository-url: https://test.pypi.org/legacy/
skip-existing: true # prevent against pushing duplicate versions