Skip to content

bump: version 0.1.0 → 0.2.0 #7

bump: version 0.1.0 → 0.2.0

bump: version 0.1.0 → 0.2.0 #7

Workflow file for this run

name: Build
on:
push:
branches:
- main
jobs:
tox:
if: "!startsWith(github.event.head_commit.message, 'bump:')"
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
if: ${{ env.CODECOV_TOKEN != '' }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
bump-version:
needs: tox
if: "!startsWith(github.event.head_commit.message, 'bump:')"
env:
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
runs-on: ubuntu-latest
name: "Bump version and create changelog with commitizen"
steps:
- name: Check out
if: ${{ env.PERSONAL_ACCESS_TOKEN != '' }}
uses: actions/checkout@v3
with:
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
fetch-depth: 0
- name: Create bump and changelog
if: ${{ env.PERSONAL_ACCESS_TOKEN != '' }}
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
changelog_increment_filename: body.md
- name: Release
if: ${{ env.PERSONAL_ACCESS_TOKEN != '' }}
uses: softprops/action-gh-release@v1
with:
body_path: "body.md"
tag_name: ${{ env.REVISION }}
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}