Update CI and CD (#67)
This commit is contained in:
38
.github/workflows/publish.yml
vendored
38
.github/workflows/publish.yml
vendored
@@ -5,22 +5,26 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- v*
|
- v*
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-n-publish:
|
publish:
|
||||||
name: Build and publish
|
name: Publish to PyPI
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- name: Checkout
|
||||||
- name: Set up Python 3.7
|
uses: actions/checkout@v3
|
||||||
uses: actions/setup-python@v1
|
- name: Set up PDM
|
||||||
with:
|
uses: pdm-project/setup-pdm@v3
|
||||||
python-version: 3.7
|
- name: Build
|
||||||
- name: Install dependencies
|
run: |
|
||||||
run: |
|
pdm build
|
||||||
python -m pip install poetry
|
- name: Publish package
|
||||||
- name: Build a binary wheel and a source tarball
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
run: |
|
with:
|
||||||
poetry build
|
password: ${{ secrets.PYPI_PASSWORD }}
|
||||||
- name: Publish distribution to PyPI
|
- name: Release
|
||||||
run: |
|
uses: softprops/action-gh-release@v1
|
||||||
poetry publish -u __token__ -p ${{ secrets.pypi_password }}
|
with:
|
||||||
|
generate_release_notes: true
|
||||||
|
|||||||
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@@ -46,7 +46,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
os: ${{ matrix.os }}
|
os: ${{ matrix.os }}
|
||||||
- name: Upload coverage reports to Codecov
|
- name: Upload coverage reports to Codecov
|
||||||
uses: codecov/codecov-action@v1
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
flags: unittests
|
flags: unittests
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
|||||||
|
/build/
|
||||||
|
/dist/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
|
||||||
.tox/
|
.tox/
|
||||||
|
|||||||
Reference in New Issue
Block a user