Skip to content

build(deps): bump codecov/codecov-action from 3 to 4 #28

build(deps): bump codecov/codecov-action from 3 to 4

build(deps): bump codecov/codecov-action from 3 to 4 #28

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@v4
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@v4
with:
files: ./coverage.xml # coverage report
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
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
# Define job steps
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Check-out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install poetry
uses: snok/install-poetry@v1
- name: Install package
run: poetry install
- name: Use Python Semantic Release to prepare release
env:
# This token is created automatically by GH Actions
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
poetry run semantic-release publish
- 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 }}