Skip to content

Commit 8190efa

Browse files
authored
Merge pull request #7 from chrishavlin/update_release_actions
Update release actions
2 parents 7a04179 + 4672186 commit 8190efa

File tree

2 files changed

+34
-18
lines changed

2 files changed

+34
-18
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+
python -m 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: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,28 @@ 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 -U setuptools setuptools_scm wheel twine
23+
- name: Build and check source tarball
24+
run: python setup.py sdist bdist_wheel
25+
- name: Twine check
26+
run: twine check dist/*
3227
- name: Publish distribution to PyPI
3328
if: startsWith(github.ref, 'refs/tags')
34-
uses: pypa/gh-action-pypi-publish@master
29+
uses: pypa/gh-action-pypi-publish@release/v1
3530
with:
3631
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)