Semantic Release #15
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: | |
workflow_dispatch: | |
inputs: | |
releaseType: | |
description: "version update type" | |
required: true | |
type: choice | |
default: "automatic" | |
options: | |
- "automatic" | |
- "major" | |
- "minor" | |
- "patch" | |
env: | |
CUDA_HOME: "/usr" # nvcc is not required, but CUDAExtension needs that env | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
concurrency: release | |
permissions: | |
id-token: write | |
contents: write | |
environment: | |
name: pypi | |
url: https://test.pypi.org/project/ds-splat | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Python Semantic Release Manual | |
id: release_manual | |
if: ${{ github.event.inputs.releaseType != 'automatic' }} | |
uses: python-semantic-release/python-semantic-release@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
force: ${{ github.event.inputs.releaseType }} | |
changelog: false | |
- name: Python Semantic Release Automatic | |
id: release_automatic | |
if: ${{ github.event.inputs.releaseType == 'automatic' }} | |
uses: python-semantic-release/python-semantic-release@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
changelog: false | |
env: | |
CUDA_HOME: "/usr" # nvcc is not required, but CUDAExtension needs that env | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: steps.release_manual.outputs.released == 'true' || steps.release_automatic.outputs.released == 'true' |