Skip to content

Create Release

Create Release #1

Workflow file for this run

name: Create Release
on:
workflow_dispatch:
inputs:
tag_name:
required: true
type: string
release:
description: "Whether to create a GitHub Release"
type: boolean
default: true
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup venv
run: |
python -m venv .venv
. .venv/bin/activate
python -m pip install build
- name: Build
run: |
. .venv/bin/activate
python -m build
- name: Create Release
shell: bash
env:
TAG_NAME: ${{ inputs.tag_name }}
GH_TOKEN: ${{ github.token }}
run: |
release_args=(
"$TAG_NAME"
--title "${TAG_NAME}"
--target "$GITHUB_SHA"
--generate-notes
)
# check for e.g., v1.1.0-rc0
if [[ $TAG_NAME == *-* ]]; then
release_args+=( --prerelease )
fi
gh release create "${release_args[@]}" dist/*.whl