chore(deps): bump idna from 3.6 to 3.7 (#70) #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |