chore: Fix setuptools dependency #27
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: | |
release: | |
runs-on: ubuntu-latest | |
concurrency: release | |
environment: | |
name: pypi | |
url: https://pypi.org/p/variant-extractor | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
contents: write | |
outputs: | |
released: ${{ steps.release.outputs.released }} | |
version: ${{ steps.release.outputs.version }} | |
steps: | |
- uses: actions/checkout@master | |
with: | |
fetch-depth: 0 | |
# Install setuptools (using sudo) | |
- name: Install setuptools globally | |
run: | | |
sudo apt install python3-setuptools | |
- name: Python Semantic Release | |
id: release | |
uses: python-semantic-release/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
# The following line is required to ensure that the package is only published to PyPI when a new version is released. | |
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true. | |
# See https://github.com/actions/runner/issues/1173 | |
if: steps.release.outputs.released == 'true' | |
- name: Publish package distributions to GitHub Releases | |
uses: python-semantic-release/[email protected] | |
if: steps.release.outputs.released == 'true' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ steps.release.outputs.tag }} | |
build_docs: | |
needs: release | |
if: needs.release.outputs.released == 'true' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- id: deployment | |
uses: sphinx-notes/pages@v3 | |
with: | |
publish: false | |
documentation_path: './docs/source' | |
requirements_path: './requeriments_docs.txt' | |
- uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ${{ steps.deployment.outputs.artifact }} |