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

View File

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

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