release #3
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: 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 "martin.kim@scverse.org" | |
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 }} |