Skip to content

Commit

Permalink
publish to pypi gx-cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
allensallinger committed Oct 3, 2023
1 parent 2e13a41 commit 1d5514c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .github/workflows/publish-to-pypi-gx-cloud.yaml
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
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: publish-to-pypi
on:
push:
branches:
- main
- gx-cloud-pypi

jobs:
pypi-test-publish:
Expand Down

0 comments on commit 1d5514c

Please sign in to comment.