Skip to content

Commit c702fb4

Browse files
committed
Add workflow to prepare a release
1 parent 6dd970a commit c702fb4

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Prepare O2 tag
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Tag to prepare'
8+
required: true
9+
default: 'vX.Y.Z'
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Decide which branch to use
16+
run: |
17+
cat << EOF
18+
::set-output name=branch::$(echo ${{ github.event.inputs.tag }}-patches | tr . - | sed -e's/-[0-9]*-patches$/-patches/')
19+
EOF
20+
id: decide_release_branch
21+
- uses: actions/checkout@v2
22+
with:
23+
ref: "dev"
24+
- name: Tag branch (or create one before tagging if does not exists)
25+
run: |
26+
set -x
27+
git fetch origin
28+
git checkout -B ${{ steps.decide_release_branch.outputs.branch }} origin/${{ steps.decide_release_branch.outputs.branch }}
29+
git config --global user.email "alibuild@cern.ch"
30+
git config --global user.name "ALICE Action Bot"
31+
git tag ${{ github.event.inputs.tag }}
32+
git push --set-upstream origin ${{ github.event.inputs.tag }}
33+
- name: Create Release
34+
id: create_release
35+
uses: actions/create-release@v1
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
38+
with:
39+
tag_name: ${{ github.event.inputs.tag }}
40+
release_name: ${{ github.event.inputs.tag }}
41+
draft: false
42+
prerelease: false

0 commit comments

Comments
 (0)