-
Notifications
You must be signed in to change notification settings - Fork 60
105 lines (93 loc) · 3.79 KB
/
CD.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: CD
on:
workflow_dispatch:
inputs:
major:
description: Year
type: number
required: true
default: '24'
minor:
description: Release
type: number
required: true
default: '3'
build:
description: Beta
type: number
required: true
default: '0'
revision:
description: Alpha
type: number
required: true
default: '0'
SSLCert:
description: "Add Certificate"
type: choice
required: true
default: 'No'
options:
- 'Yes'
- 'No'
jobs:
Create-version-Number:
runs-on: ubuntu-latest
outputs:
version_number: ${{ steps.version.outputs.number }}
version_tag: ${{ steps.version.outputs.tag }}
steps:
- name: create version environment variable - alpha
if: ${{ github.event.inputs.revision != 0 }}
run: |
echo "gingertag=20${{ github.event.inputs.major}}.${{ github.event.inputs.minor}}-Alpha.${{github.event.inputs.build}}.${{ github.event.inputs.revision}}" >> $GITHUB_ENV
echo "gingernumber=${{ github.event.inputs.major}}.${{ github.event.inputs.minor}}.${{ github.event.inputs.build}}.${{ github.event.inputs.revision}}" >> $GITHUB_ENV
- name: create version environment variable - BETA
if: ${{ (github.event.inputs.build != 0) && (github.event.inputs.revision == 0 )}}
run: |
echo "gingertag=20${{ github.event.inputs.major}}.${{ github.event.inputs.minor}}-Beta.${{ github.event.inputs.build}}" >> $GITHUB_ENV
echo "gingernumber=${{ github.event.inputs.major}}.${{ github.event.inputs.minor}}.${{ github.event.inputs.build}}.${{ github.event.inputs.revision}}" >> $GITHUB_ENV
- name: create version environment variable - Release
if: ${{ (github.event.inputs.build == 0 ) && ( github.event.inputs.revision == 0) }}
run: |
echo "gingertag=20${{ github.event.inputs.major}}.${{ github.event.inputs.minor}}-Official" >> $GITHUB_ENV
echo "gingernumber=${{ github.event.inputs.major}}.${{ github.event.inputs.minor}}.${{ github.event.inputs.build}}.${{ github.event.inputs.revision}}" >> $GITHUB_ENV
- name: create environment variable
id: version
run: |
echo "number=${{ env.gingernumber}}" >> $GITHUB_OUTPUT
echo "tag=${{ env.gingertag}}" >> $GITHUB_OUTPUT
- name: create version variable text file
run: |
echo "NUMBER=${{env.gingernumber}}" > version.txt
echo "TAG=${{ env.gingertag}}" >> version.txt
cat version.txt
- name: Cache Version text file
id: cache
uses: actions/[email protected]
with:
path:
./version.txt
key:
cache-version-${{ github.run_number }}
enableCrossOsArchive:
true
CI:
name: CI
needs: Create-version-Number
uses: ./.github/workflows/CI-2.yml
secrets: inherit
Release:
name: Release
needs: CI
uses: ./.github/workflows/Release-2.yml
secrets: inherit
Deploy:
name: Deploy
needs: Release
uses: ./.github/workflows/Deploy-2.yml
Docker:
name: Docker
needs: CI
uses: ./.github/workflows/Docker.yml
secrets: inherit