Skip to content

Commit

Permalink
👷 Use own workflow for creating and publishing new releases
Browse files Browse the repository at this point in the history
  • Loading branch information
daniil-berg committed Apr 26, 2023
1 parent 862a517 commit 3f0e3db
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]'"
Expand All @@ -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

0 comments on commit 3f0e3db

Please # to comment.