Skip to content

Commit 6d86780

Browse files
committed
ci: use artifacts for final upload
1 parent 0125ad6 commit 6d86780

File tree

1 file changed

+29
-14
lines changed

1 file changed

+29
-14
lines changed

.github/workflows/build.yml

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,25 @@ on:
77
workflow_dispatch:
88

99
jobs:
10+
create-release:
11+
runs-on: ubuntu-22.04
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
16+
- name: Create Release
17+
id: create_release
18+
uses: actions/create-release@v1
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
with:
22+
tag_name: ${{ github.ref }}
23+
release_name: Release ${{ github.ref }}
24+
draft: false
25+
prerelease: false
26+
1027
build-and-release:
28+
needs: create-release
1129
strategy:
1230
matrix:
1331
board:
@@ -37,33 +55,30 @@ jobs:
3755
. /opt/esp/idf/export.sh
3856
cmake -Daction=merge_binaries -P Bootloader.cmake
3957
40-
- name: Upload binary to release
58+
- name: Upload artifact
4159
uses: actions/upload-artifact@v2
4260
with:
4361
name: graphical_bootloader_${{ matrix.board.name }}
4462
path: build/combined.bin
4563

46-
release:
64+
upload-release-assets:
4765
needs: build-and-release
4866
runs-on: ubuntu-22.04
4967
steps:
50-
- name: Create Release
51-
id: create_release
52-
uses: actions/create-release@v1
53-
env:
54-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
- name: Checkout
69+
uses: actions/checkout@v3
70+
71+
- name: Download Artifacts
72+
uses: actions/download-artifact@v2
5573
with:
56-
tag_name: ${{ github.ref }}
57-
release_name: Release ${{ github.ref }}
58-
draft: false
59-
prerelease: false
74+
path: ./artifacts
6075

61-
- name: Upload Release Asset
76+
- name: Upload Release Assets
6277
uses: actions/upload-release-asset@v1
6378
env:
6479
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6580
with:
66-
upload_url: ${{ steps.create_release.outputs.upload_url }}
67-
asset_path: build/combined.bin
81+
upload_url: ${{ needs.create-release.outputs.upload_url }}
82+
asset_path: ./artifacts/*
6883
asset_name: graphical_bootloader_${{ matrix.board.name }}.bin
6984
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)