Skip to content

Release 1.0.0b3

Release 1.0.0b3 #21

Workflow file for this run

name: CI
on:
push:
branches: ['*']
tags: ['v[0-9]+.[0-9]+.[0-9]+*']
pull_request:
branches: ['master']
workflow_dispatch:
jobs:
tox-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Configure default git identity
run: |
git config --global user.email "[email protected]"
git config --global user.name "Test"
- run: python -m pip install --upgrade pip
- run: pip install tox tox-gh-actions
- run: tox
env:
TOX_TESTENV_PASSENV: HOME
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/pre-commit
~/.cache/pip
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml', 'pdm.lock') }}
- run: python -m pip install --upgrade pip
- run: pip install pre-commit
- run: pre-commit run -a
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pdm-project/setup-pdm@v3
- run: pdm install
- run: pdm run mypy
publish-to-pypi:
needs: [tox-tests, pre-commit, mypy]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/p/lektor-git-timestamp/
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pdm-project/setup-pdm@v3
- run: pdm publish