Skip to content

Commit

Permalink
ci: add release workflow (#291)
Browse files Browse the repository at this point in the history
* feat: update dev module tutorial for lossoutput

* ci: add release workflow
  • Loading branch information
martinkim0 authored Jul 8, 2024
1 parent fa798a1 commit 97b7671
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
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
needs: validate-tag
# 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 }}

0 comments on commit 97b7671

Please sign in to comment.