Skip to content

Merge pull request #61 from rwxd/renovate/pydantic-2.x #12

Merge pull request #61 from rwxd/renovate/pydantic-2.x

Merge pull request #61 from rwxd/renovate/pydantic-2.x #12

Workflow file for this run

---
on:
push:
branches:
- "*"
tags:
- "v*.*.*"
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup
run: make setup
- name: Run pre-commit
run: pre-commit run --show-diff-on-failure --all-files
env:
SKIP: "no-commit-to-branch"
semantic-release:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs:
- pre-commit
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.CICD_APP_ID }}
private-key: ${{ secrets.CICD_APP_PRIVATE_KEY }}
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: "${{ steps.generate_token.outputs.token }}"
pypi:
runs-on: ubuntu-latest
needs:
- pre-commit
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: pip install wheel
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}