Skip to content

Commit 846b99c

Browse files
committed
1 parent fbbd3d7 commit 846b99c

1 file changed

Lines changed: 19 additions & 21 deletions

File tree

.github/workflows/main.yml

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,19 @@ jobs:
5858
command: choco install ccache doxygen.install graphviz
5959

6060
- name: Generate cache key
61-
id: cache_key
6261
shell: cmake -P {0}
6362
run: |
6463
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
65-
message("::set-output name=VALUE::build_${{ matrix.os }}_type-${{ matrix.build_type }}-${{ matrix.release }}")
66-
message("::set-output name=timestamp::${current_date}")
64+
file(APPEND "$ENV{GITHUB_ENV}" "CACHE_KEY=build_${{ matrix.os }}_type-${{ matrix.build_type }}-${{ matrix.release }}")
65+
file(APPEND "$ENV{GITHUB_ENV}" "CACHE_TIMESTAMP=${current_date}")
6766
6867
- name: Update the cache (ccache)
6968
uses: actions/cache@v3
7069
with:
7170
path: "${{ github.workspace }}/ccache"
72-
key: ${{ steps.cache_key.outputs.VALUE }}_ccache_${{ steps.cache_key.outputs.timestamp }}
71+
key: ${{ env.CACHE_KEY }}_ccache_${{ env.CACHE_TIMESTAMP }}
7372
restore-keys: |
74-
${{ steps.cache_key.outputs.VALUE }}_ccache_
73+
${{ env.CACHE_KEY }}_ccache_
7574
7675
- name: Setup ccache
7776
working-directory: "${{ github.workspace }}"
@@ -165,62 +164,61 @@ jobs:
165164
- name: Locate the packages (RelWithDebInfo only)
166165
if: matrix.build_type == 'RelWithDebInfo'
167166
shell: bash
168-
id: package_locations
169167
run: |
170-
echo ::set-output name=DEB_PACKAGE_PATH::$(ls build/*.deb)
171-
echo ::set-output name=DEB_PACKAGE_NAME::$(cd build && ls *.deb)
168+
echo "DEB_PACKAGE_PATH=$(ls build/*.deb)" >> $GITHUB_ENV
169+
echo "DEB_PACKAGE_NAME=$(cd build && ls *.deb)" >> $GITHUB_ENV
172170
173-
echo ::set-output name=RPM_PACKAGE_PATH::$(ls build/*.rpm)
174-
echo ::set-output name=RPM_PACKAGE_NAME::$(cd build && ls *.rpm)
171+
echo "RPM_PACKAGE_PATH=$(ls build/*.rpm)" >> $GITHUB_ENV
172+
echo "RPM_PACKAGE_NAME=$(cd build && ls *.rpm)" >> $GITHUB_ENV
175173
176174
# Rename .tar.gz files for OS
177175
pushd build
178176
for f in *.tar.gz; do mv "$f" "${{ runner.os }}-$f"; done
179177
popd
180178
181-
echo ::set-output name=TGZ_PACKAGE_PATH::$(ls build/*.tar.gz)
182-
echo ::set-output name=TGZ_PACKAGE_NAME::$(cd build && ls *.tar.gz)
179+
echo "TGZ_PACKAGE_PATH=$(ls build/*.tar.gz)" >> $GITHUB_ENV
180+
echo "TGZ_PACKAGE_NAME=$(cd build && ls *.tar.gz)" >> $GITHUB_ENV
183181
184182
# DEB Package
185183
- name: Upload the DEB package artifact (RelWithDebInfo only)
186184
if: matrix.build_type == 'RelWithDebInfo' && runner.os == 'Linux'
187185
uses: actions/upload-artifact@v3
188186
with:
189-
name: ${{ steps.package_locations.outputs.DEB_PACKAGE_NAME }}
190-
path: ${{ steps.package_locations.outputs.DEB_PACKAGE_PATH }}
187+
name: ${{ env.DEB_PACKAGE_NAME }}
188+
path: ${{ env.DEB_PACKAGE_PATH }}
191189

192190
- name: Release DEB package artifact (RelWithDebInfo only)
193191
uses: softprops/action-gh-release@v0.1.14
194192
if: matrix.build_type == 'RelWithDebInfo' && runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/') && matrix.release == 'stable'
195193
with:
196-
files: ${{ steps.package_locations.outputs.DEB_PACKAGE_PATH }}
194+
files: ${{ env.DEB_PACKAGE_PATH }}
197195

198196
# RPM Package
199197
- name: Upload the RPM package artifact (RelWithDebInfo only)
200198
if: matrix.build_type == 'RelWithDebInfo' && runner.os == 'Linux'
201199
uses: actions/upload-artifact@v3
202200
with:
203-
name: ${{ steps.package_locations.outputs.RPM_PACKAGE_NAME }}
204-
path: ${{ steps.package_locations.outputs.RPM_PACKAGE_PATH }}
201+
name: ${{ env.RPM_PACKAGE_NAME }}
202+
path: ${{ env.RPM_PACKAGE_PATH }}
205203
- name: Release RPM package artifact (RelWithDebInfo only)
206204
uses: softprops/action-gh-release@v0.1.14
207205
if: matrix.build_type == 'RelWithDebInfo' && runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/') && matrix.release == 'stable'
208206
with:
209-
files: ${{ steps.package_locations.outputs.RPM_PACKAGE_PATH }}
207+
files: ${{ env.RPM_PACKAGE_PATH }}
210208

211209
# TGZ Package
212210
- name: Upload the TGZ package artifact (RelWithDebInfo only)
213211
if: matrix.build_type == 'RelWithDebInfo'
214212
uses: actions/upload-artifact@v3
215213
with:
216-
name: ${{ steps.package_locations.outputs.TGZ_PACKAGE_NAME }}
217-
path: ${{ steps.package_locations.outputs.TGZ_PACKAGE_PATH }}
214+
name: ${{ env.TGZ_PACKAGE_NAME }}
215+
path: ${{ env.TGZ_PACKAGE_PATH }}
218216

219217
- name: Release TGZ package artifact (RelWithDebInfo only)
220218
uses: softprops/action-gh-release@v0.1.14
221219
if: matrix.build_type == 'RelWithDebInfo' && startsWith(github.ref, 'refs/tags/') && matrix.release == 'stable'
222220
with:
223-
files: ${{ steps.package_locations.outputs.TGZ_PACKAGE_PATH }}
221+
files: ${{ env.TGZ_PACKAGE_PATH }}
224222

225223
# This step is down at the bottom because Windows fails but we still want
226224
# to upload the built binaries, regardless. We also want to see if/when

0 commit comments

Comments
 (0)