Skip to content

style: simplified requirements #70

style: simplified requirements

style: simplified requirements #70

name: Release package on GitHub and pypi
on:
push:
branches:
- main
# https://python-semantic-release.readthedocs.io/en/latest/automatic-releases/github-actions.html
jobs:
release:
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
# - name: pip install python-build package
# run: |
# pip install -q build
# python -m build
# ---
# This action uses Python Semantic Release v7
# - name: Python Semantic Release
# uses: python-semantic-release/[email protected] # relekang/python-semantic-release@master
# with:
# github_token: ${{ secrets.GH_TOKEN }}
# repository_username: __token__
# repository_password: ${{ secrets.PyPI_TOKEN }}
# ---
# This action uses Python Semantic Release v8
- name: Python Semantic Release
id: release
uses: python-semantic-release/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: MarkusPic
git_committer_email: [email protected]
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# 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'
# with:
# password: ${{ secrets.PyPI_TOKEN }}
# - name: Publish package distributions to GitHub Releases
# uses: python-semantic-release/upload-to-gh-release@main
# if: steps.release.outputs.released == 'true'
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}