mirror of
https://github.com/davegallant/rfd.git
synced 2025-08-06 08:43:41 +00:00
Add PyPI publish action (#91)
* Add PyPI publish action * Use poetry * Bump version to 0.7.0
This commit is contained in:
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@@ -3,4 +3,4 @@
|
||||
# @davegallant will be requested for
|
||||
# review when someone opens a pull request.
|
||||
|
||||
* @davegallant
|
||||
* @davegallant
|
||||
|
33
.github/workflows/pypi.yml
vendored
Normal file
33
.github/workflows/pypi.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: PyPI Publish
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and publish Python 🐍 distributions 📦 to PyPI
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install pypa/build
|
||||
run: >-
|
||||
python -m
|
||||
pip install
|
||||
build
|
||||
--user
|
||||
- name: Build a binary wheel and a source tarball
|
||||
run: >-
|
||||
python -m
|
||||
build
|
||||
--sdist
|
||||
--wheel
|
||||
--outdir dist/
|
||||
.
|
||||
- name: Publish package
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
10
.github/workflows/tests.yml
vendored
10
.github/workflows/tests.yml
vendored
@@ -1,5 +1,5 @@
|
||||
name: Tests
|
||||
on: [push]
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -16,10 +16,10 @@ jobs:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install .
|
||||
pip install -r requirements_dev.txt
|
||||
pip install poetry==1.1.6
|
||||
poetry install
|
||||
- name: Run pre-commit
|
||||
run: |
|
||||
git diff --name-only $TRAVIS_COMMIT_RANGE | xargs pre-commit run --files
|
||||
git diff --name-only $TRAVIS_COMMIT_RANGE | xargs poetry run pre-commit run --files
|
||||
- name: Test
|
||||
run: make ci
|
||||
run: poetry run make ci
|
||||
|
Reference in New Issue
Block a user