10
10
11
11
jobs :
12
12
13
+ #
14
+ # Linux build job
15
+ #
13
16
build-linux :
14
17
15
18
runs-on : ubuntu-latest
25
28
id : strings-linux
26
29
shell : bash
27
30
run : |
28
- echo "build-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
29
31
echo "build-name=${{ (github.ref_name == 'master' || github.ref_name == 'develop' || startsWith(github.ref_name, 'feature')) && 'snapshot' || github.ref_name }}" >> "$GITHUB_OUTPUT"
30
32
echo "build-version=${{ (github.ref_name == 'master' || github.ref_name == 'develop' || startsWith(github.ref_name, 'feature')) && '0.0.0' || github.ref_name }}" >> "$GITHUB_OUTPUT"
31
33
echo "cpu-count=4" >> "$GITHUB_OUTPUT"
@@ -44,14 +46,13 @@ jobs:
44
46
sudo apt update
45
47
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
46
48
47
- - name : ' Set version '
49
+ - name : ' Build project '
48
50
run : |
51
+ export DEBEMAIL="[email protected] "
52
+ export DEBFULLNAME="Jose Vicente Campos"
49
53
echo "Setting version: ${{ steps.strings-linux.outputs.build-version }}"
50
54
dch --create --package nfc-lab --newversion "${{ steps.strings-linux.outputs.build-version }}" "Automated build"
51
55
dch --release --distribution unstable ""
52
-
53
- - name : ' Build project'
54
- run : |
55
56
dpkg-buildpackage -us -uc -j${{ steps.strings-linux.outputs.cpu-count }}
56
57
57
58
- name : Show output files
61
62
uses : actions/upload-artifact@v4
62
63
with :
63
64
name : linux-artifact
64
- path : ${{ github.workspace }}/nfc-lab_${{ steps.strings-linux.outputs.build-version }}_ *.deb
65
+ path : ../ *.deb
65
66
67
+ #
68
+ # Windows build job
69
+ #
66
70
build-windows :
67
71
68
72
runs-on : windows-latest
@@ -170,6 +174,9 @@ jobs:
170
174
name : windows-artifact
171
175
path : ${{ steps.strings-windows.outputs.build-dir }}/nfc-lab-${{ steps.strings-windows.outputs.build-name }}-installer-x86_64.exe
172
176
177
+ #
178
+ # Create release job
179
+ #
173
180
create-release :
174
181
175
182
runs-on : ubuntu-latest
@@ -179,11 +186,11 @@ jobs:
179
186
180
187
steps :
181
188
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
187
194
188
195
- name : Download Windows Artifact
189
196
uses : actions/download-artifact@v4
@@ -219,95 +226,4 @@ jobs:
219
226
body : |
220
227
This is the latest snapshot build for version ${{ github.ref }}.
221
228
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