-
Notifications
You must be signed in to change notification settings - Fork 9
51 lines (46 loc) · 1.3 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
43
44
45
46
47
48
49
50
name: Release
on:
workflow_dispatch:
inputs:
version_to_publish:
description: "Version to be release"
required: false
jobs:
TestMainline:
name: Test Mainline
uses: ./.github/workflows/code_quality.yml
with:
branch: mainline
secrets: inherit
Merge:
needs: TestMainline
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: release
fetch-depth: 0
token: ${{ secrets.CI_TOKEN }}
- name: Set Git config
run: |
git config --local user.email "[email protected]"
git config --local user.name "client-software-ci"
- name: Update Release
run: git merge --ff-only origin/mainline -v
- name: Push new release
if: ${{ inputs.version_to_publish}}
run: |
git tag -a ${{ inputs.version_to_publish }} -m "Release ${{ inputs.version_to_publish }}"
git push origin release ${{ inputs.version_to_publish }}
- name: Push post release
if: ${{ !inputs.version_to_publish}}
run: git push origin release
TestRelease:
needs: Merge
name: Test Release
uses: ./.github/workflows/code_quality.yml
with:
branch: release
secrets: inherit