Skip to content

Commit

Permalink
💚 Fix setting up Poetry for GitHub Action Publish (#23)
Browse files Browse the repository at this point in the history
* 💚 Fix setting up Poetry for GitHub Action Publish

* 🐛 Fix references to Poetry
  • Loading branch information
tiangolo authored Nov 23, 2020
1 parent c6d360c commit 57ff5e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ jobs:
python-version: "3.7"
- name: Install poetry
run: |
curl -fsS -o get-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py
python get-poetry.py -y
echo "::set-env name=PATH::$HOME/.poetry/bin:$PATH"
python -m pip install --upgrade pip
python -m pip install poetry
- name: Configure poetry
run: poetry config virtualenvs.in-project true
run: python -m poetry config virtualenvs.in-project true
- name: Set up cache
uses: actions/cache@v1
id: cache
Expand All @@ -29,12 +28,12 @@ jobs:
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
run: python -m poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
- name: Install Dependencies
run: poetry install
run: python -m poetry install
- name: Publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
python -m poetry config pypi-token.pypi $PYPI_TOKEN
bash scripts/publish.sh
2 changes: 1 addition & 1 deletion scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -e

poetry publish --build
python -m poetry publish --build

0 comments on commit 57ff5e2

Please sign in to comment.