Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create pypi_publish.yml #868

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/pypi_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "PYPI Publish"
on:
workflow_dispatch:
jobs:
publish-to-test-pypi:
name: Publish to Test PyPI

if: |
${{
github.repository == 'owasp/nettacker' &&
github.event_name == 'push' &&
github.ref_name == 'implement-package-publishing-poc' }}
# environment: test
needs:
- build-package
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Get package artifacts
uses: actions/download-artifact@v3
with:
name: dist
path: dist

- name: Publish package distributions to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
publish-to-pypi:
name: Publish to PyPI
if: |
${{ github.repository == 'owasp/nettacker' &&
github.event_name == 'push' &&
github.ref_name == 'implement-package-publishing-poc' }}
# environment: release
needs:
- build-package
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Get package artifacts
uses: actions/download-artifact@v3
with:
name: dist
path: dist

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Loading