Skip to content

Commit 36ecd74

Browse files
committed
additionally publish to PyPi if GitHub release action is "published"
1 parent 12ec5e1 commit 36ecd74

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ name: Publish Python Package and Docker Image
1111
on:
1212
push:
1313
branches:
14-
- develop
14+
- release-v*
1515
release:
1616
types: [published]
1717

@@ -59,23 +59,12 @@ jobs:
5959
name: netfoundry-pypi-${{ github.run_id }}
6060
path: dist/netfoundry-*.tar.gz
6161

62-
# - name: Publish Release Package
63-
# uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
64-
# with:
65-
# user: __token__
66-
# password: ${{ secrets.PYPI_API_TOKEN }}
67-
68-
# docker_image:
69-
# needs: [upload_pypi]
70-
# runs-on: ubuntu-latest
71-
# steps:
72-
# - name: Checkout Workspace
73-
# uses: actions/checkout@v2
74-
75-
# - uses: actions/download-artifact@v2
76-
# with:
77-
# name: netfoundry-pypi-${{ github.run_id }}
78-
# path: dist/
62+
- name: Publish Release Package
63+
if: github.event.action == "published"
64+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
65+
with:
66+
user: __token__
67+
password: ${{ secrets.PYPI_API_TOKEN }}
7968

8069
- name: Set up QEMU
8170
uses: docker/setup-qemu-action@master

0 commit comments

Comments
 (0)