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