Merge pull request #86 from rwxd/renovate/python-dev-deps #22
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
--- | |
on: | |
push: | |
branches: | |
- "*" | |
tags: | |
- "v*.*.*" | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v5 | |
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@v5 | |
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 }} |