-
Notifications
You must be signed in to change notification settings - Fork 256
39 lines (34 loc) · 1.04 KB
/
main.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
---
name: Prepare AliRoot tag
'on':
workflow_dispatch:
inputs:
tag:
description: 'Tag to prepare'
required: true
default: 'v5-09-XXy'
permissions:
contents: write # to push a tag and create a release
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Decide which branch to use
run: |
case "$TAG" in
v5-09-59*) echo branch=master ;;
*) echo "branch=$(echo "$TAG-patches" | sed -r 's/[a-z]+-patches$/-patches/')" ;;
esac >> "$GITHUB_OUTPUT"
id: decide_release_branch
env:
TAG: ${{ github.event.inputs.tag }}
- name: Tag and create release
uses: ncipollo/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
generateReleaseNotes: true