Skip to content

Commit

Permalink
Prepare for PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
mgao6767 committed Apr 1, 2023
1 parent 0e14495 commit 07e8194
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish to PyPI

on:
push:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
build:
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.10
- name: Build package
run: |
python -m pip install --upgrade pip
python setup.py sdist
- name: Publish package
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
7 changes: 6 additions & 1 deletion edgaranalyzer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import types
import sys

__version__ = "0.0.1"
__version__ = "0.0.1rc1"
__description__ = "Textual analysis on SEC filings from EDGAR"
__author__ = "Mingze Gao"
__author_email__ = "mingze.gao@sydney.edu.au"
__url__ = "https://github.com/mgao6767/edgar-analyzer"

if sys.version_info.major < 3 and sys.version_info.minor < 10:
print("Python3.10 or higher is required.")
sys.exit(1)

CMD = types.SimpleNamespace()
CMD.DOWNLOAD_INDEX = "download_index"
CMD.DOWNLOAD_FILINGS = "download_filings"
Expand Down

0 comments on commit 07e8194

Please sign in to comment.