Skip to content

Commit

Permalink
Workflow to prepare a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf committed Jul 21, 2020
1 parent 06bbdcd commit f5e6f5f
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/prepare-patch-release-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Prepare AliPhysics tag

on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to prepare'
required: true
default: 'v5-09-XXy'
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Decide which branch to use
run: |
cat << EOF
::set-output name=branch::$(echo AliPhysics-${{ github.event.inputs.tag }}-01-patches | sed -e's/[a-z][a-z]*-01-patches$/-01-patches/')
EOF
id: decide_release_branch
- uses: actions/checkout@v2
with:
ref: "${{ steps.decide_release_branch.outputs.branch }}"
- name: Update the branch
run: |
git checkout ${{ steps.decide_release_branch.outputs.branch }}
git grep -l v5-09 | xargs perl -p -i -e 's/v5-09-[0-9][0-9][a-z]*/${{ github.event.inputs.tag }}/g'
git add .
git diff
git config --global user.email "[email protected]"
git config --global user.name "ALICE Action Bot"
git commit -m "Bump to ${{ github.event.inputs.tag }}" -a || echo "No changes to commit"
git push
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: AliPhysics-${{ github.event.inputs.tag }}-01
release_name: AliPhysics-${{ github.event.inputs.tag }}-01
draft: false
prerelease: false

0 comments on commit f5e6f5f

Please sign in to comment.