generated from daniil-berg/boilerplate-py
👷 Use own workflow for creating and publishing new releases
This commit is contained in:
parent
862a517018
commit
3f0e3db427
25
.github/workflows/ci.yaml
vendored
25
.github/workflows/ci.yaml
vendored
@ -2,17 +2,15 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: master
|
||||||
- master
|
tags: 'v*.*.*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-and-check:
|
test:
|
||||||
name: Tests and checks
|
name: Test
|
||||||
uses: daniil-berg/reusable-workflows/.github/workflows/python-test.yaml@v0.0.1
|
uses: daniil-berg/reusable-workflows/.github/workflows/python-test.yaml@v0.2.1
|
||||||
with:
|
with:
|
||||||
versions: '["3.9", "3.10", "3.11"]'
|
versions: '["3.9", "3.10", "3.11"]'
|
||||||
cache: pip
|
|
||||||
cache-dependency-path: pyproject.toml
|
|
||||||
unittest-command: 'scripts/test.sh'
|
unittest-command: 'scripts/test.sh'
|
||||||
coverage-command: 'scripts/cov.sh'
|
coverage-command: 'scripts/cov.sh'
|
||||||
unittest-requirements: "-e '.[dev]'"
|
unittest-requirements: "-e '.[dev]'"
|
||||||
@ -21,3 +19,16 @@ jobs:
|
|||||||
typecheck-all-versions: true
|
typecheck-all-versions: true
|
||||||
lint-command: 'scripts/lint.sh'
|
lint-command: 'scripts/lint.sh'
|
||||||
lint-requirements: '-Ur requirements/dev.txt'
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user