From 66b9a8b5bbfe7c6422803cbb725ede0cad892766 Mon Sep 17 00:00:00 2001 From: Naoto Mizuno Date: Mon, 11 Sep 2023 20:35:32 +0900 Subject: [PATCH] Update publish CI --- .github/workflows/publish-to-pypi.yml | 14 +++++++------- setup.py | 11 +++++++++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index f54d5d4..66f8e93 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -7,13 +7,13 @@ on: 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@master - - name: Set up Python 3.7 - uses: actions/setup-python@v1 + - name: Set up Python 3.8 + uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.8 - name: Install pypa/build run: >- python -m @@ -29,11 +29,11 @@ jobs: --outdir dist/ . - name: Publish distribution to Test PyPI - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ + repository-url: https://test.pypi.org/legacy/ - name: Publish distribution to PyPI - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/setup.py b/setup.py index 51588bc..1aa4313 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,19 @@ +import os import setuptools + +def get_long_description() -> str: + readme = os.path.join(os.path.dirname(__file__), "README.md") + with open(readme) as f: + return f.read() + + setuptools.setup( name='rime', version='3.0.0.dev', + description="An automation tool for programming contest organizers", + long_description=get_long_description(), + long_description_content_type="text/markdown", scripts=['bin/rime', 'bin/rime_init'], packages=['rime', 'rime.basic', 'rime.basic.targets', 'rime.basic.util', 'rime.core', 'rime.plugins', 'rime.plugins.judge_system',