Skip to content

Commit c2e2752

Browse files
committed
update actions
1 parent 7a04179 commit c2e2752

File tree

2 files changed

+33
-17
lines changed

2 files changed

+33
-17
lines changed

.github/workflows/check-build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Check Build
2+
on: pull_request
3+
4+
jobs:
5+
twinecheck:
6+
name: twinecheck
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Set up Python
11+
uses: actions/setup-python@v2
12+
with:
13+
python-version: 3.9
14+
- name: Install dependencies
15+
run: |
16+
python -m pip install --upgrade pip
17+
pip install -U setuptools setuptools_scm wheel twine
18+
- name: Build and check
19+
run: |
20+
python setup.py sdist bdist_wheel
21+
twine check dist/*

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

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,26 @@ on:
44
tags:
55
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
66

7-
name: Publish Python distributions to PyPI and TestPyPI
7+
name: Publish distributions to PyPI
88

99
jobs:
1010
build-and-publish:
1111
name: Build and Publish
12-
runs-on: ubuntu-18.04
12+
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@master
15-
- name: Set up Python 3.7
15+
- name: Set up Python 3.9
1616
uses: actions/setup-python@v1
1717
with:
18-
python-version: 3.7
19-
- name: Install pypa/build
20-
run: >-
21-
python -m
22-
pip install
23-
build
24-
--user
25-
- name: Build source tarball
26-
run: >-
27-
python -m
28-
build
29-
--sdist
30-
--outdir dist/
31-
.
18+
python-version: 3.9
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
python -m pip install build --user
23+
python -m pip install twine
24+
- name: Build and check source tarball
25+
run: |
26+
python -m build --sdist --outdir dist/ .
3227
- name: Publish distribution to PyPI
3328
if: startsWith(github.ref, 'refs/tags')
3429
uses: pypa/gh-action-pypi-publish@master

0 commit comments

Comments
 (0)