Skip to content

fix: Fix typings and documentation examples (#66) #19

fix: Fix typings and documentation examples (#66)

fix: Fix typings and documentation examples (#66) #19

Workflow file for this run

name: Semantic Release
on:
push:
branches:
- main
jobs:
semantic-release:
runs-on: ubuntu-latest
concurrency: release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install poetry
run: pipx install poetry
- name: Install tox
run: pipx install tox
- uses: actions/setup-python@v5
with:
python-version: 3.12
cache: 'poetry'
- name: Install dependencies
run: poetry install
- name: Create .env file
run: |
echo API_KEY_NAME="${{ secrets.INTEGRATION_TEST_API_KEY_NAME }}" >> .env
echo API_KEY="${{ secrets.INTEGRATION_TEST_API_KEY }}" >> .env
- name: Run Integration Tests
run: tox -e integration
- name: Create version
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
CURRENT_VERSION=$(poetry run semantic-release --noop version --print-last-released-tag)
echo "Current version: ${CURRENT_VERSION}"
poetry run semantic-release version --no-changelog
NEXT_VERSION=$(poetry run semantic-release --noop version --print-tag)
echo "Next version: ${NEXT_VERSION}"
if [[ "${CURRENT_VERSION}" == "${NEXT_VERSION}" ]]; then
echo "SHOULD_PUBLISH=0" >> $GITHUB_ENV
echo "No new version to publish"
else
echo "SHOULD_PUBLISH=1" >> $GITHUB_ENV
echo "New version to publish"
fi
- name: Publish to PyPI
if: env.SHOULD_PUBLISH == '1'
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
run: poetry publish