Skip to content

Merge pull request #162 from KennethEnevoldsen/pre-commit-ci-update-c… #57

Merge pull request #162 from KennethEnevoldsen/pre-commit-ci-update-c…

Merge pull request #162 from KennethEnevoldsen/pre-commit-ci-update-c… #57

Workflow file for this run

name: Release
on:
# uncomment the following to only release on push to main
# this is not recommended as it will not release if the tests fail
# however it is faster and can be used for testing
push:
branches:
- main
# uncomment the following to only release on a successful workflow run
# this is recommended as it will only release if the tests pass
# this however cause you to test twice which might be not be ideal
# if you oncomment this
# workflow_run:
# workflows: ["Tests"]
# types:
# - completed
jobs:
release:
runs-on: ubuntu-latest
concurrency: release
# if the workflow run was successful and the branch is main:
# only uncomment this if you uncomment the workflow_run above
# if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main' }}
# only uncomment this if you run on push to main
if: ${{ github.ref == 'refs/heads/main' }}
steps:
# Checkout action is required for token to persist
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.RELEASE }}
- name: Python Semantic Release
uses: relekang/[email protected]
with:
github_token: ${{ secrets.RELEASE }}
# Remember to copy the [semantic_release] section from pyproject.toml
# as well
# To enable pypi,
# 1) Set upload_to_pypi to true in pyproject.toml and
# 2) Set the pypi_token in the repo
# 3) Uncomment the two lines below
repository_username: __token__
repository_password: ${{ secrets.PYPI_API_TOKEN }}