10
10
commit :
11
11
description : Commit to be released
12
12
required : false
13
+ rc :
14
+ description : " release candidate"
15
+ required : false
16
+ default : false
17
+ type : boolean
13
18
14
19
defaults :
15
20
run :
@@ -22,6 +27,7 @@ concurrency:
22
27
env :
23
28
VERSION : " ${{ github.event.inputs.version }}"
24
29
COMMIT : " ${{ github.event.inputs.commit }}"
30
+ RELEASE_CANDIDATE : " ${{ github.event.inputs.rc }}"
25
31
26
32
jobs :
27
33
test :
@@ -70,22 +76,29 @@ jobs:
70
76
environment : staging
71
77
runs-on : ubuntu-latest
72
78
needs : test
73
- env :
74
- PACKAGE_NAME : " logsmith_linux_${VERSION}.zip"
75
79
76
80
steps :
77
81
- name : Checkout
78
82
uses : actions/checkout@v3
79
83
with :
80
84
ref : ${{ env.COMMIT }}
81
85
86
+ - name : Set package name
87
+ run : |
88
+ if [ "${{ env.RELEASE_CANDIDATE }}" = "true" ]; then
89
+ export PACKAGE_NAME="logsmith_linux_${VERSION}-rc.zip" >> $GITHUB_ENV
90
+ else
91
+ export PACKAGE_NAME="logsmith_linux_${VERSION}.zip" >> $GITHUB_ENV
92
+ fi
93
+
82
94
- name : Setup Python
83
95
uses : actions/setup-python@v4
84
96
with :
85
97
python-version : 3.11
86
98
87
99
- name : Setup Project
88
100
run : |
101
+ sudo apt-get install libxcb-cursor0 libxcb-xinerama0 libxcb-xkb1 libxkbcommon-x11-0
89
102
python -m pip install --upgrade pip
90
103
pip install -r requirements.txt
91
104
@@ -102,10 +115,17 @@ jobs:
102
115
commit=${GITHUB_SHA}
103
116
fi
104
117
118
+ if [ "${{ env.RELEASE_CANDIDATE }}" = "true" ]; then
119
+ version="${VERSION}-rc"
120
+ else
121
+ version="${VERSION}"
122
+ fi
123
+
124
+
105
125
pip install requests
106
126
./ci/release.py \
107
127
--repository "${{ github.repository }}" \
108
- --version "${{ env.VERSION } }" \
128
+ --version "${version }" \
109
129
--commit "${commit}" \
110
130
--token "${{ secrets.GITHUB_TOKEN }}" \
111
131
--asset "${{ env.PACKAGE_NAME }}"
@@ -115,15 +135,21 @@ jobs:
115
135
environment : staging
116
136
runs-on : macos-latest
117
137
needs : test
118
- env :
119
- PACKAGE_NAME : " logsmith_darwin_${VERSION}.zip"
120
138
121
139
steps :
122
140
- name : Checkout
123
141
uses : actions/checkout@v3
124
142
with :
125
143
ref : ${{ env.COMMIT }}
126
144
145
+ - name : Set package name
146
+ run : |
147
+ if [ "${{ env.RELEASE_CANDIDATE }}" = "true" ]; then
148
+ export PACKAGE_NAME="logsmith_darwin_${VERSION}-rc.zip" >> $GITHUB_ENV
149
+ else
150
+ export PACKAGE_NAME="logsmith_darwin_${VERSION}.zip" >> $GITHUB_ENV
151
+ fi
152
+
127
153
- name : Setup Python
128
154
uses : actions/setup-python@v4
129
155
with :
@@ -147,10 +173,16 @@ jobs:
147
173
commit=${GITHUB_SHA}
148
174
fi
149
175
176
+ if [ "${{ env.RELEASE_CANDIDATE }}" = "true" ]; then
177
+ version="${VERSION}-rc"
178
+ else
179
+ version="${VERSION}"
180
+ fi
181
+
150
182
pip install requests
151
183
./ci/release.py \
152
184
--repository "${{ github.repository }}" \
153
- --version "${{ env.VERSION } }" \
185
+ --version "${version }" \
154
186
--commit "${commit}" \
155
187
--token "${{ secrets.GITHUB_TOKEN }}" \
156
188
--asset "${{ env.PACKAGE_NAME }}"
0 commit comments