Pin python Docker tag to e83d1f4 #86
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: ["main", "renovate/*"] | |
tags: ["*.*.*"] | |
pull_request: | |
branches: ["main"] | |
workflow_dispatch: | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') != true | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4 | |
with: | |
path: ~/.cache/pypoetry | |
key: ${{ runner.os }}-poetry-${{ hashFiles('**/pyproject.toml', '**/poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-poetry- | |
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5 | |
with: | |
python-version: "3.12" | |
- name: poetry install | |
run: | | |
pip install poetry | |
poetry install | |
- run: poetry run pyright sachi/ | |
- run: poetry run ruff check sachi/ | |
if: always() | |
release: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5 | |
with: | |
python-version: "3.12" | |
- run: | | |
pip install poetry | |
poetry publish --build | |
env: | |
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }} | |
- run: | | |
gh release create ${{ github.ref_name }} dist/* \ | |
--generate-notes \ | |
--notes-start-tag $(git tag --sort -v:refname | head -n2 | tail -n1) | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |