👷 Use own workflow for creating and publishing new releases

This commit is contained in:
Daniil Fajnberg 2023-04-26 17:04:12 +02:00
parent 862a517018
commit 3f0e3db427
Signed by: daniil-berg
GPG Key ID: BE187C50903BEE97
1 changed files with 18 additions and 7 deletions

View File

@ -2,17 +2,15 @@ name: CI
on:
push:
branches:
- master
branches: master
tags: 'v*.*.*'
jobs:
test-and-check:
name: Tests and checks
uses: daniil-berg/reusable-workflows/.github/workflows/python-test.yaml@v0.0.1
test:
name: Test
uses: daniil-berg/reusable-workflows/.github/workflows/python-test.yaml@v0.2.1
with:
versions: '["3.9", "3.10", "3.11"]'
cache: pip
cache-dependency-path: pyproject.toml
unittest-command: 'scripts/test.sh'
coverage-command: 'scripts/cov.sh'
unittest-requirements: "-e '.[dev]'"
@ -21,3 +19,16 @@ jobs:
typecheck-all-versions: true
lint-command: 'scripts/lint.sh'
lint-requirements: '-Ur requirements/dev.txt'
release:
name: Release
if: ${{ github.ref_type == 'tag' }}
needs: test
uses: daniil-berg/reusable-workflows/.github/workflows/python-release.yaml@v0.2.1
with:
git-ref: ${{ github.ref_name }}
secrets:
release-token: ${{ secrets.TOKEN_GITHUB_CREATE_RELEASE }}
publish-token: ${{ secrets.TOKEN_PYPI_PROJECT }}
permissions:
contents: write