Skip to content

Commit

Permalink
Merge pull request #301 from grid-parity-exchange/pypi_action_update
Browse files Browse the repository at this point in the history
Update PyPI action
  • Loading branch information
bknueven authored Apr 3, 2023
2 parents 51f434d + ab673f3 commit 96d1bdb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: Publish Python distributions to PyPI and TestPyPI

on:
push:
tags:
- '*'
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main

jobs:
build-n-publish:
name: Build and publish Python distributions to PyPI and TestPyPI
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Set up Python 3.7
Expand All @@ -25,10 +27,10 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
repository-url: https://test.pypi.org/legacy/
skip-existing: true
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_password }}
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# ___________________________________________________________________________

from setuptools import setup, find_packages
from distutils.core import Extension
from pathlib import Path

DISTNAME = 'gridx-egret'
VERSION = '0.5.4.dev0'
Expand All @@ -30,6 +30,9 @@
'python_requires' : '>=3.7, <4',
}

this_directory = Path(__file__).parent
long_description = (this_directory / 'README.md').read_text()

setup(name=DISTNAME,
version=VERSION,
packages=PACKAGES,
Expand All @@ -38,5 +41,7 @@
author=AUTHOR,
maintainer_email=MAINTAINER_EMAIL,
license=LICENSE,
long_description=long_description,
long_description_content_type='text/markdown',
url=URL,
**setuptools_kwargs)

0 comments on commit 96d1bdb

Please sign in to comment.