Skip to content

Bump version to 0.17.0 #70

Bump version to 0.17.0

Bump version to 0.17.0 #70

Workflow file for this run

---
# To trigger a package release, create a new tag in the format v.x.x.x with semantic versioning
name: PyPi Package Release
on:
push:
tags:
# Only run this workflow for tags that start with 'v.' (release tags)
- 'v*'
jobs:
test:
runs-on: ubuntu-latest
name: Test with Python ${{ matrix.python-version }}
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
strategy:
matrix:
# Python 3.9 build fail via GitHub action, so we're skipping it for now
# python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11"]
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/requirements-test.txt
# Additional build dependencies
pip install wheel
- name: Build and install aicodebot
run: |
python setup.py sdist bdist_wheel
pip install dist/*.whl
- name: Test
run: |
aicodebot -V
pytest --record-mode=new_episodes
pypi_release:
needs: test
runs-on: ubuntu-latest
name: Publish to PyPi
permissions:
# Required for github actions to create a release
contents: write
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: pip
- name: Build the package
run: |
pip install wheel twine
python setup.py sdist bdist_wheel
- name: Publish to PyPi
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine check dist/*
twine upload dist/*
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true