Skip to content

Commit 66b9a8b

Browse files
committed
Update publish CI
1 parent a61dbfb commit 66b9a8b

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

.github/workflows/publish-to-pypi.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ on:
77
jobs:
88
build-n-publish:
99
name: Build and publish Python distributions to PyPI and TestPyPI
10-
runs-on: ubuntu-18.04
10+
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@master
13-
- name: Set up Python 3.7
14-
uses: actions/setup-python@v1
13+
- name: Set up Python 3.8
14+
uses: actions/setup-python@v4
1515
with:
16-
python-version: 3.7
16+
python-version: 3.8
1717
- name: Install pypa/build
1818
run: >-
1919
python -m
@@ -29,11 +29,11 @@ jobs:
2929
--outdir dist/
3030
.
3131
- name: Publish distribution to Test PyPI
32-
uses: pypa/gh-action-pypi-publish@master
32+
uses: pypa/gh-action-pypi-publish@release/v1
3333
with:
3434
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
35-
repository_url: https://test.pypi.org/legacy/
35+
repository-url: https://test.pypi.org/legacy/
3636
- name: Publish distribution to PyPI
37-
uses: pypa/gh-action-pypi-publish@master
37+
uses: pypa/gh-action-pypi-publish@release/v1
3838
with:
3939
password: ${{ secrets.PYPI_API_TOKEN }}

setup.py

+11
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1+
import os
12
import setuptools
23

4+
5+
def get_long_description() -> str:
6+
readme = os.path.join(os.path.dirname(__file__), "README.md")
7+
with open(readme) as f:
8+
return f.read()
9+
10+
311
setuptools.setup(
412
name='rime',
513
version='3.0.0.dev',
14+
description="An automation tool for programming contest organizers",
15+
long_description=get_long_description(),
16+
long_description_content_type="text/markdown",
617
scripts=['bin/rime', 'bin/rime_init'],
718
packages=['rime', 'rime.basic', 'rime.basic.targets', 'rime.basic.util',
819
'rime.core', 'rime.plugins', 'rime.plugins.judge_system',

0 commit comments

Comments
 (0)