-
Notifications
You must be signed in to change notification settings - Fork 161
57 lines (50 loc) · 1.71 KB
/
prepare-patch-release-branch.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
45
46
47
48
49
50
51
52
53
54
55
56
57
---
name: Prepare AliRoot/AliPhysics tag
'on':
workflow_dispatch:
inputs:
tag:
description: 'Tag to prepare'
required: true
default: 'v5-09-XXy'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Decide which branch to use
id: decide_release_branch
run: |
case "$TAG" in
v5-09-59*) echo branch=master ;;
*) echo "branch=$(echo "AliPhysics-$TAG-patches" | sed -r 's/[a-z]+-01-patches$/-01-patches/')" ;;
esac >> "$GITHUB_OUTPUT"
env:
TAG: ${{ github.event.inputs.tag }}
- name: Checkout alidist
uses: actions/checkout@v4
with:
ref: ${{ steps.decide_release_branch.outputs.branch }}
- name: Tag AliRoot and AliPhysics in alidist
run: |
set -x
sed -ri "s/v5-09-[0-9][0-9][a-z]*/$TAG/g" ./*.sh
git config --global user.email "alibuild@cern.ch"
git config --global user.name "ALICE Action Bot"
git commit -a -m "Bump to $TAG" || echo "No changes to commit"
git show
git tag "AliPhysics-$TAG-01"
git push origin "AliPhysics-$TAG-01"
# We only want to update -patches branches with new tags, not master.
[ "$BRANCH" = master ] || git push origin "$BRANCH"
env:
TAG: ${{ github.event.inputs.tag }}
BRANCH: ${{ steps.decide_release_branch.outputs.branch }}
- name: Create release
uses: alisw/release-action@v1
with:
tag_name: AliPhysics-${{ github.event.inputs.tag }}-01
release_name: AliPhysics-${{ github.event.inputs.tag }}-01
draft: false
prerelease: false