Skip to content

Commit

Permalink
Create python-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sepehrkrz authored Oct 30, 2023
1 parent 12a6b4a commit aa0cb8e
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish nwmurl to PYPI

on:
pull_request:
types:
- closed

jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:

- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x

- name: Print Repository URL
run: |
REPO_URL="https://github.com/${{ github.repository }}"
echo "Repository URL: $REPO_URL"
- name: Install dependencies
run: pip install setuptools wheel

- name: Build and deploy package
run: |
python setup.py sdist bdist_wheel
pip install twine==4.0.2
twine upload -u '__token__' -p ${{ secrets.PYPI_API_TOKEN }} dist/*

0 comments on commit aa0cb8e

Please sign in to comment.