Skip to content

Commit

Permalink
update release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mstechly committed Apr 25, 2024
1 parent fbdb9bc commit e47fc63
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/quality_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ jobs:
- uses: actions/checkout@v2
- name: Setup poetry
uses: abatilo/actions-poetry@v2
- name:
- name: Run quality checks
run: |
poetry install
pip install pre-commit
pre-commit install
pre-commit run -a
poetry install
pip install pre-commit
pre-commit install
pre-commit run -a
- name: Run mypy
run: MYPYPATH=src poetry run mypy --install-types --non-interactive src

test_docs_are_building:
runs-on: ubuntu-latest
steps:
Expand All @@ -67,6 +67,6 @@ jobs:
uses: abatilo/actions-poetry@v2
- name: Install package and deps
run: |
poetry install --with docs
poetry install --with docs
- name: Build docs
run: poetry run mkdocs build
26 changes: 26 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build and release

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/qref # TODO: test PyPI
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install pypa/build
run: python -m pip install build --user
- name: Build binary wheel and source tarball
run: python -m build --sdist --wheel --outdir dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit e47fc63

Please sign in to comment.