forked from alisw/AliPhysics
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.24 KB
/
release.yml
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
---
name: Prepare AliPhysics tag
'on':
workflow_dispatch:
inputs:
tag:
description: 'Tag to prepare'
required: true
default: 'v5-09-XXy-01'
permissions: {}
jobs:
build:
permissions:
contents: write # for git push
runs-on: ubuntu-latest
steps:
- name: Decide which branch to use
run: |
case "$TAG" in
v5-09-60*) echo branch=master ;;
*) echo "branch=$(echo "$TAG-patches" | sed -r 's/[a-z]+-01-patches$/-01-patches/')" ;;
esac >> "$GITHUB_OUTPUT"
id: decide_release_branch
env:
TAG: ${{ github.event.inputs.tag }}
- name: Tag and create release
uses: alisw/release-action@v1
with:
name: ${{ github.event.inputs.tag }}
# The tag is created from the given commit if it does not exist yet.
tag: ${{ github.event.inputs.tag }}
commit: ${{ steps.decide_release_branch.outputs.branch }}
draft: false
prerelease: false
# GitHub often chooses the wrong tag to compare against for
# generating release notes -- it'll generate a diff e.g. between
# v5-09-56-patches and master.
generateReleaseNotes: false