Skip to content

release

release #7

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
tag:
description: "The version to tag (without the leading 'v'). If omitted, will initiate a dry run (no uploads)."
default: ""
type: string
prerelease:
description: "Whether the release is a pre-release."
default: false
type: boolean
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tag-release:
name: Tag release
runs-on: ubuntu-latest
# If you don't set an input tag, it's a dry run (no uploads).
if: ${{ inputs.tag }}
permissions:
# For git tag
contents: write
steps:
- uses: actions/checkout@v4
- name: git tag
run: |
git config --global user.email "[email protected]"
git config --global user.name "scvi-tools release"
git tag -m "${{ inputs.tag }}" "${{ inputs.tag }}"
git push --tags
publish-release:
name: Publish to GitHub
runs-on: ubuntu-latest
needs: tag-release
# If you don't set an input tag, it's a dry run (no uploads).
if: ${{ inputs.tag }}
permissions:
# For GitHub release publishing
contents: write
steps:
- uses: actions/checkout@v4
- uses: softprops/action-gh-release@v2
with:
name: ${{ inputs.tag }}
tag_name: ${{ inputs.tag }}
generate_release_notes: true
prerelease: ${{ inputs.prerelease }}