Skip to content

Commit

Permalink
Publish to PyPI manually, not via marketplace.
Browse files Browse the repository at this point in the history
Previously we were using a GitHub Marketplace action for this, but
this turns out not to be quite flexible enough for what we're trying to do here.
  • Loading branch information
lemonsaurus committed Jul 1, 2021
1 parent d6e7daa commit cd0b640
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,21 @@ jobs:
with:
python-version: "3.9"

- name: Install Poetry >= 1.2.0a
run: |
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py -O &&
python install-poetry.py --preview
- name: Install dependencies
run: poetry install

- name: Install poetry-version-plugin
run: poetry plugin add poetry-version-plugin

- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1 # https://github.com/marketplace/actions/publish-python-poetry-package
with:
python_version: '3.9.0'
poetry_version: '>=1.2.0a1'
pypi_token: ${{ secrets.PYPI_TOKEN }}
repository_name: 'blackbox-cli'
repository_url: 'https://pypi.org/project/blackbox-cli/'
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} &&
poetry publish --build
build-and-push-on-release:
name: Build and push
Expand Down

0 comments on commit cd0b640

Please sign in to comment.