Update CI and CD (#67)

This commit is contained in:
Regen
2023-01-08 17:26:32 +09:00
committed by GitHub
parent 2a5983f9aa
commit 691beef1dc
3 changed files with 24 additions and 18 deletions

View File

@@ -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

View File

@@ -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
View File

@@ -1,3 +1,5 @@
/build/
/dist/
__pycache__/
.tox/