forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.31 KB
/
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
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 >> "$GITHUB_OUTPUT"
branch=$(echo ${{ github.event.inputs.tag }}-patches | tr . - | sed -e's/-[0-9]*-patches$/-patches/')
EOF
id: decide_release_branch
- uses: actions/checkout@v3
with:
ref: "dev"
- name: Tag branch (or create one before tagging if does not exists)
run: |
set -x
git fetch origin
git checkout -B ${{ steps.decide_release_branch.outputs.branch }}
git config --global user.email "alibuild@cern.ch"
git config --global user.name "ALICE Action Bot"
git tag ${{ github.event.inputs.tag }}
git push --set-upstream origin ${{ 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: ${{ github.event.inputs.tag }}
release_name: ${{ github.event.inputs.tag }}
draft: false
prerelease: false