Skip to content

build(deps): bump actions/setup-python from 4 to 5 #26

build(deps): bump actions/setup-python from 4 to 5

build(deps): bump actions/setup-python from 4 to 5 #26

Workflow file for this run

name: release
on: [push, pull_request]
jobs:
ci:
# Set up operating system
runs-on: ubuntu-latest
# Define job steps
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Check-out repository
uses: actions/checkout@v4
- name: Install poetry
uses: snok/install-poetry@v1
- name: Install package
run: poetry install
- name: Safety checks
run: poetry run nox -s safety
- name: Run tests
run: poetry run nox -s tests
- name: Use Codecov to track coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml # coverage report
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Build documentation
run: poetry run nox -s docs
cd:
# Only run this job if the "ci" job passes
needs: ci
# Only run this job if new work is pushed to "main"
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
# Set up operating system
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
# Define job steps
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
# This action uses Python Semantic Release v8
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
- name: Test install from TestPyPI
run: |
pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple \
cookiecutter_dinkin_flicka
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}