|
7 | 7 | workflow_dispatch: |
8 | 8 |
|
9 | 9 | 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 | + |
10 | 27 | build-and-release: |
| 28 | + needs: create-release |
11 | 29 | strategy: |
12 | 30 | matrix: |
13 | 31 | board: |
@@ -37,33 +55,30 @@ jobs: |
37 | 55 | . /opt/esp/idf/export.sh |
38 | 56 | cmake -Daction=merge_binaries -P Bootloader.cmake |
39 | 57 |
|
40 | | - - name: Upload binary to release |
| 58 | + - name: Upload artifact |
41 | 59 | uses: actions/upload-artifact@v2 |
42 | 60 | with: |
43 | 61 | name: graphical_bootloader_${{ matrix.board.name }} |
44 | 62 | path: build/combined.bin |
45 | 63 |
|
46 | | - release: |
| 64 | + upload-release-assets: |
47 | 65 | needs: build-and-release |
48 | 66 | runs-on: ubuntu-22.04 |
49 | 67 | 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 |
55 | 73 | with: |
56 | | - tag_name: ${{ github.ref }} |
57 | | - release_name: Release ${{ github.ref }} |
58 | | - draft: false |
59 | | - prerelease: false |
| 74 | + path: ./artifacts |
60 | 75 |
|
61 | | - - name: Upload Release Asset |
| 76 | + - name: Upload Release Assets |
62 | 77 | uses: actions/upload-release-asset@v1 |
63 | 78 | env: |
64 | 79 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
65 | 80 | 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/* |
68 | 83 | asset_name: graphical_bootloader_${{ matrix.board.name }}.bin |
69 | 84 | asset_content_type: application/octet-stream |
0 commit comments