Skip to content

Commit 97b7671

Browse files
authored
ci: add release workflow (#291)
* feat: update dev module tutorial for lossoutput * ci: add release workflow
1 parent fa798a1 commit 97b7671

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/release.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: "The version to tag (without the leading 'v'). If omitted, will initiate a dry run (no uploads)."
8+
default: ""
9+
type: string
10+
prerelease:
11+
description: "Whether the release is a pre-release."
12+
default: false
13+
type: boolean
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
tag-release:
21+
name: Tag release
22+
runs-on: ubuntu-latest
23+
needs: validate-tag
24+
# If you don't set an input tag, it's a dry run (no uploads).
25+
if: ${{ inputs.tag }}
26+
permissions:
27+
# For git tag
28+
contents: write
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: git tag
32+
run: |
33+
git config --global user.email "[email protected]"
34+
git config --global user.name "scvi-tools release"
35+
git tag -m "${{ inputs.tag }}" "${{ inputs.tag }}"
36+
git push --tags
37+
38+
publish-release:
39+
name: Publish to GitHub
40+
runs-on: ubuntu-latest
41+
needs: tag-release
42+
# If you don't set an input tag, it's a dry run (no uploads).
43+
if: ${{ inputs.tag }}
44+
permissions:
45+
# For GitHub release publishing
46+
contents: write
47+
steps:
48+
- uses: actions/checkout@v4
49+
- uses: softprops/action-gh-release@v2
50+
with:
51+
name: ${{ inputs.tag }}
52+
tag_name: ${{ inputs.tag }}
53+
generate_release_notes: true
54+
prerelease: ${{ inputs.prerelease }}

0 commit comments

Comments
 (0)