Skip to content

Commit b448cb7

Browse files
committed
Keep single pipeline definition for PR and release
#701 Signed-off-by: Viktor Kopp <vifactor@gmail.com>
1 parent 97f703f commit b448cb7

File tree

2 files changed

+65
-231
lines changed

2 files changed

+65
-231
lines changed

.github/workflows/BuildPR.yml

Lines changed: 65 additions & 0 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:
@@ -211,5 +213,68 @@ jobs:
211213
with:
212214
name: DLTViewer-macos${{ matrix.osversion }}-qt6
213215
path: build/dist/DLTViewer*.tgz
216+
217+
createRelease:
218+
name: Create release
219+
runs-on: ubuntu-24.04
220+
needs: [ buildMac, buildUbuntu, buildWindows ]
221+
if: startsWith(github.ref, 'refs/tags/')
222+
steps:
223+
- name: Checkout
224+
uses: actions/checkout@v4
225+
with:
226+
fetch-depth: 0
227+
submodules: true
214228

229+
- name: Download DLT Linux artifacts
230+
uses: actions/download-artifact@v4
231+
with:
232+
name: DLT-Linux
233+
continue-on-error: true
234+
235+
- name: Download DLT macOS artifacts arm64
236+
uses: actions/download-artifact@v4
237+
with:
238+
name: DLT-Mac-arm64
239+
- name: Download DLT macOS artifacts x86
240+
uses: actions/download-artifact@v4
241+
with:
242+
name: DLT-Mac-x86
243+
- name: Download DLT Windows parser artifacts
244+
uses: actions/download-artifact@v4
245+
with:
246+
name: DLT-Windows-parser
247+
- name: Download DLT Windows sdk artifacts
248+
uses: actions/download-artifact@v4
249+
with:
250+
name: DLT-Windows-sdk
215251

252+
- name: Find Tag
253+
id: tagger
254+
uses: jimschubert/query-tag-action@v2.2
255+
with:
256+
skip-unshallow: 'true'
257+
abbrev: false
258+
commit-ish: HEAD
259+
- name: Check pre-release
260+
run: |
261+
echo "tag=${{steps.tagger.outputs.tag}}"
262+
if [[ ${{ steps.tagger.outputs.tag }} == *alpha* || ${{ steps.tagger.outputs.tag }} == *beta* ]]
263+
then
264+
prerelease=true
265+
else
266+
prerelease=false
267+
fi
268+
echo "PRE_RELEASE=$prerelease" >> $GITHUB_ENV
269+
echo "prerelease=$prerelease"
270+
- name: Create Release
271+
uses: softprops/action-gh-release@v2
272+
with:
273+
tag_name: ${{steps.tagger.outputs.tag}}
274+
generate_release_notes: true
275+
prerelease: ${{ env.PRE_RELEASE }}
276+
name: ${{steps.tagger.outputs.tag}}
277+
files: |
278+
DLT-*
279+
env:
280+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/Release.yml

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

0 commit comments

Comments
 (0)