Skip to content

Commit

Permalink
ci: use artifacts for final upload
Browse files Browse the repository at this point in the history
  • Loading branch information
georgik committed Jul 17, 2024
1 parent 0125ad6 commit 6d86780
Showing 1 changed file with 29 additions and 14 deletions.
43 changes: 29 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,25 @@ on:
workflow_dispatch:

jobs:
create-release:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

build-and-release:
needs: create-release
strategy:
matrix:
board:
Expand Down Expand Up @@ -37,33 +55,30 @@ jobs:
. /opt/esp/idf/export.sh
cmake -Daction=merge_binaries -P Bootloader.cmake
- name: Upload binary to release
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: graphical_bootloader_${{ matrix.board.name }}
path: build/combined.bin

release:
upload-release-assets:
needs: build-and-release
runs-on: ubuntu-22.04
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
path: ./artifacts

- name: Upload Release Asset
- name: Upload Release Assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/combined.bin
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./artifacts/*
asset_name: graphical_bootloader_${{ matrix.board.name }}.bin
asset_content_type: application/octet-stream

0 comments on commit 6d86780

Please sign in to comment.