Skip to content

Commit

Permalink
run publish only on release, also pub to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
aahnik committed Jun 15, 2021
1 parent 4b32a16 commit cda4deb
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Publish Packages

on:
push:
branches: [main]
on: [release]

jobs:
release:
Expand All @@ -11,10 +9,15 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install --upgrade poetry
- name: Publish to PyPI
run: poetry publish --build
env:
POETRY_HTTP_BASIC_PYPI_USERNAME: "__token__"
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build docker images and publish
- name: Build docker images and publish
run: make docker-release

0 comments on commit cda4deb

Please sign in to comment.