forked from alisw/alidist
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.55 KB
/
prepare-o2-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
45
name: Prepare O2 tag
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to prepare'
required: true
default: 'vX.Y.Z'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Decide which branch to use
run: |
cat << EOF
::set-output name=branch::$(echo O2-${{ github.event.inputs.tag }}-patches | tr . -)
EOF
id: decide_release_branch
- uses: actions/checkout@v2
with:
ref: "master"
- name: Update the branch
run: |
git checkout -B ${{ steps.decide_release_branch.outputs.branch }}
perl -p -i -e 's/version:.*/version: "${{ github.event.inputs.tag }}"/' o2.sh
perl -p -i -e 's/tag:.*/tag: "${{ github.event.inputs.tag }}"/' o2.sh
git config --global user.email "alibuild@cern.ch"
git config --global user.name "ALICE Action Bot"
git commit -m "Bump to ${{ github.event.inputs.tag }}" -a || echo "No changes to commit"
git show
git push --set-upstream origin ${{ steps.decide_release_branch.outputs.branch }}
git tag O2-${{ github.event.inputs.tag }}
git push origin O2-${{ github.event.inputs.tag }}
- 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: O2-${{ github.event.inputs.tag }}
release_name: O2-${{ github.event.inputs.tag }}
draft: false
prerelease: false