-
Notifications
You must be signed in to change notification settings - Fork 25
53 lines (49 loc) · 1.45 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 }}