Skip to content
This repository was archived by the owner on May 7, 2026. It is now read-only.

chore(ci): Use ubuntu-latest - Ubuntu 20 is dead #20

chore(ci): Use ubuntu-latest - Ubuntu 20 is dead

chore(ci): Use ubuntu-latest - Ubuntu 20 is dead #20

Workflow file for this run

#
# Copyright 2022-Present Sonatype Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Deploy to PyPI
on:
push:
branches:
- main
workflow_dispatch:
env:
REPORTS_DIR: CI_reports
DIST_DIR: dist
DIST_ARTIFACT: python-dist
PYTHON_VERSION: "3.10"
POETRY_VERSION: "1.1.11"
jobs:
release:
# https://github.community/t/how-do-i-specify-job-dependency-running-in-another-workflow/16482
# limit this to being run on regular commits, not the commits that semantic-release will create
if: github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):')
runs-on: ubuntu-latest
concurrency: release
outputs:
version-before: ${{ steps.before-release.outputs.version }} # version may be empty
released: ${{ steps.after-release.outputs.released }} # optional bool-ish string
version-after: ${{ steps.after-release.outputs.version }} # version may still be empty
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
architecture: 'x64'
- name: Install poetry
uses: Gr1N/setup-poetry@48b0f77c8c1b1b19cb962f0f00dff7b4be8f81ec # v9
with:
poetry-version: ${{ env.POETRY_VERSION }}
- name: Install dependencies
run: poetry install --no-root
- name: View poetry version
run: poetry --version
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@5f28b835b0dbaaeaf2d80c6caaac3d66d4f7d0b0 # v7.31.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}