Skip to content

Bump abatilo/actions-poetry from 2.3.0 to 3.0.0 #298

Bump abatilo/actions-poetry from 2.3.0 to 3.0.0

Bump abatilo/actions-poetry from 2.3.0 to 3.0.0 #298

Workflow file for this run

name: Build, lint, test, package and publish
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types: [ published ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.7, 3.8, 3.9 ]
steps:
- uses: actions/[email protected]
- name: Determine version
id: get_version
run: |
if [ "${{ github.event_name }}" == "release" ]; then
version="${GITHUB_REF##*/}"
else
version="1.0.dev${{ github.run_id }}"
fi
echo "Setting version to $version"
echo "::set-output name=version::$version"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/[email protected]
- name: Set version
run: |
poetry version ${{ steps.get_version.outputs.version }}
sed -i "s/\"1.0.dev0\"/\"${{ steps.get_version.outputs.version }}\"/g" clin/__init__.py
- name: Install dependencies
run: poetry install
- name: Run linter
run: poetry run black clin --check
- name: Build packages
run: poetry build
- name: Run tests
run: poetry run pytest
- name: Publish to PyPI
if: github.event_name == 'release' && matrix.python-version == '3.7'
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish