Skip to content

Commit f28393b

Browse files
committed
release test
1 parent 7e8ca33 commit f28393b

File tree

1 file changed

+19
-103
lines changed

1 file changed

+19
-103
lines changed

.github/workflows/cmake-build.yml

Lines changed: 19 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010

1111
jobs:
1212

13+
#
14+
# Linux build job
15+
#
1316
build-linux:
1417

1518
runs-on: ubuntu-latest
@@ -25,7 +28,6 @@ jobs:
2528
id: strings-linux
2629
shell: bash
2730
run: |
28-
echo "build-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
2931
echo "build-name=${{ (github.ref_name == 'master' || github.ref_name == 'develop' || startsWith(github.ref_name, 'feature')) && 'snapshot' || github.ref_name }}" >> "$GITHUB_OUTPUT"
3032
echo "build-version=${{ (github.ref_name == 'master' || github.ref_name == 'develop' || startsWith(github.ref_name, 'feature')) && '0.0.0' || github.ref_name }}" >> "$GITHUB_OUTPUT"
3133
echo "cpu-count=4" >> "$GITHUB_OUTPUT"
@@ -44,14 +46,13 @@ jobs:
4446
sudo apt update
4547
sudo apt install -y devscripts build-essential debhelper-compat cmake qt6-base-dev libusb-1.0-0-dev zlib1g-dev libgl1-mesa-dev libairspy-dev librtlsdr-dev
4648
47-
- name: 'Set version'
49+
- name: 'Build project'
4850
run: |
51+
export DEBEMAIL="[email protected]"
52+
export DEBFULLNAME="Jose Vicente Campos"
4953
echo "Setting version: ${{ steps.strings-linux.outputs.build-version }}"
5054
dch --create --package nfc-lab --newversion "${{ steps.strings-linux.outputs.build-version }}" "Automated build"
5155
dch --release --distribution unstable ""
52-
53-
- name: 'Build project'
54-
run: |
5556
dpkg-buildpackage -us -uc -j${{ steps.strings-linux.outputs.cpu-count }}
5657
5758
- name: Show output files
@@ -61,8 +62,11 @@ jobs:
6162
uses: actions/upload-artifact@v4
6263
with:
6364
name: linux-artifact
64-
path: ${{ github.workspace }}/nfc-lab_${{ steps.strings-linux.outputs.build-version }}_*.deb
65+
path: ../*.deb
6566

67+
#
68+
# Windows build job
69+
#
6670
build-windows:
6771

6872
runs-on: windows-latest
@@ -170,6 +174,9 @@ jobs:
170174
name: windows-artifact
171175
path: ${{ steps.strings-windows.outputs.build-dir }}/nfc-lab-${{ steps.strings-windows.outputs.build-name }}-installer-x86_64.exe
172176

177+
#
178+
# Create release job
179+
#
173180
create-release:
174181

175182
runs-on: ubuntu-latest
@@ -179,11 +186,11 @@ jobs:
179186

180187
steps:
181188

182-
# - name: Download Linux Artifact
183-
# uses: actions/download-artifact@v4
184-
# with:
185-
# name: linux-artifact
186-
# path: ./release
189+
- name: Download Linux Artifact
190+
uses: actions/download-artifact@v4
191+
with:
192+
name: linux-artifact
193+
path: ./release
187194

188195
- name: Download Windows Artifact
189196
uses: actions/download-artifact@v4
@@ -219,95 +226,4 @@ jobs:
219226
body: |
220227
This is the latest snapshot build for version ${{ github.ref }}.
221228
env:
222-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
223-
224-
# - name: 'Create release (Common)'
225-
# if: startsWith(github.ref, 'refs/tags/')
226-
# uses: actions/create-release@v1
227-
# id: create-release
228-
# with:
229-
# draft: false
230-
# prerelease: false
231-
# release_name: ${{ github.ref }}
232-
# tag_name: ${{ github.ref }}
233-
# body: |
234-
# This is the release for version ${{ github.ref }}.
235-
# env:
236-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
237-
#
238-
# - name: 'Upload release (Windows)'
239-
# if: runner.os == 'Windows' && startsWith(github.ref, 'refs/tags/')
240-
# uses: actions/upload-release-asset@v1
241-
# with:
242-
# upload_url: ${{ steps.create-release.outputs.upload_url }}
243-
# asset_name: nfc-lab-${{ steps.strings-common.outputs.build-name }}-installer-x86_64.exe
244-
# asset_path: ${{ steps.strings-common.outputs.build-dir }}/nfc-lab-${{ steps.strings-common.outputs.build-name }}-installer-x86_64.exe
245-
# asset_content_type: application/octet-stream
246-
# env:
247-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
248-
249-
250-
# - name: 'Upload artifact (Windows)'
251-
# if: runner.os == 'Windows'
252-
# uses: actions/upload-artifact@v4
253-
# with:
254-
# name: nfc-lab-${{ steps.strings-common.outputs.build-name }}-installer-x86_64.exe
255-
# path: ${{ steps.strings-common.outputs.build-dir }}/nfc-lab-${{ steps.strings-common.outputs.build-name }}-installer-x86_64.exe
256-
# overwrite: true
257-
258-
# - name: 'Create release (Tag)'
259-
# if: github.ref_type == 'tag'
260-
# uses: softprops/action-gh-release@v2
261-
# id: create-release
262-
# with:
263-
# draft: false
264-
# prerelease: false
265-
# name: Latest Build ${{ github.run_number }}
266-
# tag_name: Latest-${{ github.run_number }}
267-
# body: |
268-
# This is the latest snapshot build for version ${{ github.ref }}.
269-
# files: |
270-
# ${{ steps.strings-common.outputs.build-dir }}/nfc-lab-${{ steps.strings-common.outputs.build-name }}-installer-x86_64.exe
271-
# env:
272-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
273-
#
274-
# - name: 'Create release (Snapshot)'
275-
# if: github.ref_type != 'tag'
276-
# uses: softprops/action-gh-release@v2
277-
# id: create-release
278-
# with:
279-
# draft: false
280-
# prerelease: true
281-
# name: Latest Build ${{ github.run_number }}
282-
# tag_name: Latest-${{ github.run_number }}
283-
# body: |
284-
# This is the latest snapshot build for version ${{ github.ref }}.
285-
# files: |
286-
# ${{ steps.strings-common.outputs.build-dir }}/nfc-lab-${{ steps.strings-common.outputs.build-name }}-installer-x86_64.exe
287-
# env:
288-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
289-
290-
# - name: 'Create release (Common)'
291-
# if: startsWith(github.ref, 'refs/tags/')
292-
# uses: actions/create-release@v1
293-
# id: create-release
294-
# with:
295-
# draft: false
296-
# prerelease: false
297-
# release_name: ${{ github.ref }}
298-
# tag_name: ${{ github.ref }}
299-
# body: |
300-
# This is the release for version ${{ github.ref }}.
301-
# env:
302-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
303-
#
304-
# - name: 'Upload release (Windows)'
305-
# if: runner.os == 'Windows' && startsWith(github.ref, 'refs/tags/')
306-
# uses: actions/upload-release-asset@v1
307-
# with:
308-
# upload_url: ${{ steps.create-release.outputs.upload_url }}
309-
# asset_name: nfc-lab-${{ steps.strings-common.outputs.build-name }}-installer-x86_64.exe
310-
# asset_path: ${{ steps.strings-common.outputs.build-dir }}/nfc-lab-${{ steps.strings-common.outputs.build-name }}-installer-x86_64.exe
311-
# asset_content_type: application/octet-stream
312-
# env:
313-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
229+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)