Skip to content

Commit 10d6a92

Browse files
authored
Merge pull request #719 from COVESA/single-pipeline
Keep single pipeline definition for PR and release
2 parents e682f96 + 9d36b33 commit 10d6a92

File tree

2 files changed

+68
-233
lines changed

2 files changed

+68
-233
lines changed

.github/workflows/BuildPR.yml

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- master
7+
tags:
8+
- "*"
79
pull_request:
810

911
jobs:
@@ -61,11 +63,13 @@ jobs:
6163
cp ../scripts/darwin/install.md dist
6264
tar -czvf "dist/DLTViewer.tgz" -C /Users/runner/work/dlt-viewer/dlt-viewer/build/install .
6365
- name: Archive artifact
66+
run: zip DLT-macOS-${{ matrix.abi }}.zip -r build/dist
67+
- name: Archive upload
6468
uses: actions/upload-artifact@v4
6569
if: ${{ success() }}
6670
with:
67-
name: DLTViewer-${{ matrix.macos }}-${{ matrix.abi }}
68-
path: build/dist/DLTViewer*.tgz
71+
name: DLT-Mac-${{ matrix.abi }}
72+
path: DLT-macOS*.zip
6973

7074
buildUbuntu:
7175
name: Build ${{ matrix.ubuntu }}
@@ -211,5 +215,67 @@ jobs:
211215
with:
212216
name: DLTViewer-macos${{ matrix.osversion }}-qt6
213217
path: build/dist/DLTViewer*.tgz
218+
219+
createRelease:
220+
name: Create release
221+
runs-on: ubuntu-24.04
222+
needs: [ buildMac, buildMacOSQt6, buildUbuntu, buildWindows ]
223+
if: startsWith(github.ref, 'refs/tags/')
224+
steps:
225+
- name: Checkout
226+
uses: actions/checkout@v4
227+
with:
228+
fetch-depth: 0
229+
submodules: true
214230

231+
# TODO: restore AppImage build then enable this step, see https://github.com/COVESA/dlt-viewer/issues/717
232+
# - name: Download DLT Linux artifacts
233+
# uses: actions/download-artifact@v4
234+
# with:
235+
# name: DLT-Linux
236+
# continue-on-error: true
237+
238+
- name: Download DLT macOS artifacts arm64
239+
uses: actions/download-artifact@v4
240+
with:
241+
name: DLTViewer-macos15-qt6
215242

243+
- name: Download DLT macOS artifacts x86
244+
uses: actions/download-artifact@v4
245+
with:
246+
name: DLT-Mac-x86
247+
248+
- name: Download DLT Windows artifacts
249+
uses: actions/download-artifact@v4
250+
with:
251+
name: DLTViewer-windows-x86_64
252+
253+
- name: Find Tag
254+
id: tagger
255+
uses: jimschubert/[email protected]
256+
with:
257+
skip-unshallow: 'true'
258+
abbrev: false
259+
commit-ish: HEAD
260+
- name: Check pre-release
261+
run: |
262+
echo "tag=${{steps.tagger.outputs.tag}}"
263+
if [[ ${{ steps.tagger.outputs.tag }} == *alpha* || ${{ steps.tagger.outputs.tag }} == *beta* ]]
264+
then
265+
prerelease=true
266+
else
267+
prerelease=false
268+
fi
269+
echo "PRE_RELEASE=$prerelease" >> $GITHUB_ENV
270+
echo "prerelease=$prerelease"
271+
- name: Create Release
272+
uses: softprops/action-gh-release@v2
273+
with:
274+
tag_name: ${{steps.tagger.outputs.tag}}
275+
generate_release_notes: true
276+
prerelease: ${{ env.PRE_RELEASE }}
277+
name: ${{steps.tagger.outputs.tag}}
278+
files: |
279+
DLT*
280+
env:
281+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/Release.yml

Lines changed: 0 additions & 231 deletions
This file was deleted.

0 commit comments

Comments
 (0)