update ci/cd

This commit is contained in:
Guilhem Saurel
2023-03-07 13:20:32 +01:00
parent 147d396b51
commit 7eba044844
4 changed files with 23 additions and 6 deletions

View File

@@ -6,6 +6,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: pip
- run: python -m pip install -U pip
- run: python -m pip install .
- run: matrix-webhook -h

View File

@@ -5,5 +5,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
- uses: pyupio/safety@2.3.5
- run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: poetry
- run: poetry install --with dev --no-interaction
- run: poetry run flake8 .
- run: poetry run black .
- run: poetry run pydocstyle
- run: poetry run safety check
- run: poetry run poetry check

View File

@@ -10,9 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: pip install -U poetry twine wheel
- run: poetry build
- run: twine upload --non-interactive -u __token__ -p ${{ secrets.PYPI_TOKEN }} dist/*
- run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: poetry
- run: poetry publish --build -u __token__ -p ${{ secrets.PYPI_TOKEN }}
- run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- run: gh release create -t "Release ${{ env.TAG}}" -n "$(awk '/## \[${{ env.TAG }}] - /{flag=1;next}/## \[/{flag=0}flag' CHANGELOG.md)" ${{ env.TAG }} dist/*
env: