Skip to content

Update actions/checkout action to v4 (#49) #27

Update actions/checkout action to v4 (#49)

Update actions/checkout action to v4 (#49) #27

Workflow file for this run

name: release
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip poetry
poetry config virtualenvs.create false
poetry lock
poetry install
- name: Check codestyle
run: pre-commit run --all
- name: Run tests
env:
COGNITE_API_KEY: ${{ secrets.COGNITE_API_KEY }}
COGNITE_PROJECT: extractor-tests
COGNITE_BASE_URL: https://greenfield.cognitedata.com
run: bash run_tests.sh
- name: Build package
run: poetry build
- name: Release to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload --verbose dist/* || echo 'Version exists'