Skip to content

configure dependabot #413

configure dependabot

configure dependabot #413

Workflow file for this run

# test and publish to Pypi on checkin
name: tasks
on:
push:
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.12, 3.13]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox
bump-alpha:
needs: test
if: |
!contains(github.event.head_commit.message, 'bump:') &&
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
github.ref == 'refs/heads/alpha'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.x']
steps:
- uses: actions/checkout@v2
with:
token: '${{ secrets.PERSONAL_ACCESS_TOKEN }}'
fetch-depth: 0
ref: ${{ github.ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python --version
python -m pip install -U commitizen
- name: Create bump
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
cz bump --yes --increment PATCH
- name: Push changes
uses: Woile/github-push-action@master
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
tags: "true"
branch: ${{ github.ref }}
bump-beta:
needs: test
if: |
!contains(github.event.head_commit.message, 'bump:') &&
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
github.ref == 'refs/heads/beta'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.x']
steps:
- uses: actions/checkout@v2
with:
token: '${{ secrets.PERSONAL_ACCESS_TOKEN }}'
fetch-depth: 0
ref: ${{ github.ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python --version
python -m pip install -U commitizen
- name: Create bump
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
cz bump --yes --increment MINOR
- name: Push changes
uses: Woile/github-push-action@master
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
tags: "true"
branch: ${{ github.ref }}
bump-stable:
needs: test
if: |
!contains(github.event.head_commit.message, 'bump:') &&
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
github.ref == 'refs/heads/stable'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.x']
steps:
- uses: actions/checkout@v2
with:
token: '${{ secrets.PERSONAL_ACCESS_TOKEN }}'
fetch-depth: 0
ref: ${{ github.ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python --version
python -m pip install -U commitizen
- name: Create bump
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
cz bump --yes --increment MAJOR
- name: Push changes
uses: Woile/github-push-action@master
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
tags: "true"
branch: ${{ github.ref }}
deploy:
needs: test
if: |
contains(github.event.head_commit.message, 'bump:') &&
github.event_name == 'push' &&
(github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta' || github.ref == 'refs/heads/stable')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py install sdist bdist_wheel
twine upload dist/*