From 158f347a21b213f7c0eb9e9138d3d676ad8885b6 Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Tue, 17 Dec 2019 16:39:00 +0000 Subject: [PATCH] Create pythonpublish.yml --- .github/workflows/pythonpublish.yml | 26 ++++++++++++++++++++++++++ .github/workflows/release.yml | 26 -------------------------- 2 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/pythonpublish.yml delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml new file mode 100644 index 00000000..b2e8707e --- /dev/null +++ b/.github/workflows/pythonpublish.yml @@ -0,0 +1,26 @@ +name: Upload Python Package + +on: + release: + types: [published] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index f734641d..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,26 +0,0 @@ -on: release -name: Release to PyPi -jobs: - tag-filter: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: tag-filter - uses: actions/bin/filter@master - with: - args: tag - - name: check - uses: ross/python-actions/setup-py/3.7@master - with: - args: check - - name: sdist - uses: ross/python-actions/setup-py/3.7@master - with: - args: sdist - - name: upload - uses: ross/python-actions/twine@master - env: - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} - with: - args: upload ./dist/sunpy-sphinx-theme-*.tar.gz