Skip to content

Commit

Permalink
Merge pull request #7 from chrishavlin/update_release_actions
Browse files Browse the repository at this point in the history
Update release actions
  • Loading branch information
chrishavlin authored Oct 13, 2022
2 parents 7a04179 + 4672186 commit 8190efa
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 18 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/check-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check Build
on: pull_request

jobs:
twinecheck:
name: twinecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U setuptools setuptools_scm wheel twine
- name: Build and check
run: |
python setup.py sdist bdist_wheel
twine check dist/*
31 changes: 13 additions & 18 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,28 @@ on:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Publish Python distributions to PyPI and TestPyPI
name: Publish distributions to PyPI

jobs:
build-and-publish:
name: Build and Publish
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build source tarball
run: >-
python -m
build
--sdist
--outdir dist/
.
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U setuptools setuptools_scm wheel twine
- name: Build and check source tarball
run: python setup.py sdist bdist_wheel
- name: Twine check
run: twine check dist/*
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 8190efa

Please sign in to comment.