Prepare AliRoot/AliPhysics tag #110
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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-60*) echo branch=master ;; | |
*) echo "branch=$(echo "AliPhysics-$TAG-01-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 "[email protected]" | |
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: | |
name: AliPhysics-${{ github.event.inputs.tag }}-01 | |
tag: AliPhysics-${{ github.event.inputs.tag }}-01 | |
draft: false | |
prerelease: false |