Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions .github/workflows/firmware_release_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@ name: "Firmware Nightly Release"

on:
workflow_call:
inputs:
product_name:
description: "Product name for release naming"
required: true
type: string
workflow_dispatch:
inputs:
product_name:
description: "Product name for release naming"
required: true
type: string

jobs:
publish-nightly-release:
Expand Down Expand Up @@ -66,11 +76,11 @@ jobs:
fi
echo "Tag deletion process completed."

- name: Download all nightly artifacts
- name: Download nightly artifacts
uses: actions/download-artifact@v4
with:
path: build/ # Path to save the downloaded artifacts
merge-multiple: true
name: nightly_firmware
path: build/

- name: Remove duplicate file (the one that does not have date in the name)
run: |
Expand All @@ -80,7 +90,7 @@ jobs:
uses: vimtor/action-zip@v1
with:
files: build/
dest: knot_nightly.zip
dest: ${{ inputs.product_name }}_nightly.zip

- name: Build Changelog
id: github_release
Expand All @@ -95,7 +105,7 @@ jobs:
with:
name: Nightly Build
tag_name: ${{ steps.get_version.outputs.tag_name }}
files: knot_nightly.zip
files: ${{ inputs.product_name }}_nightly.zip
draft: false
prerelease: true
body: ${{steps.github_release.outputs.changelog}}
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/firmware_release_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: "Firmware Production Release"
on:
workflow_call:
inputs:
product_name:
description: "Product name for release naming"
required: true
type: string
release_version:
description: "Git tag version for the release"
required: true
Expand All @@ -13,6 +17,10 @@ on:
type: string
workflow_dispatch:
inputs:
product_name:
description: "Product name for release naming"
required: true
type: string
release_version:
description: "Git tag version for the release"
required: true
Expand All @@ -35,15 +43,15 @@ jobs:
- name: Zip artifacts for Github Release
uses: vimtor/action-zip@v1
with:
files: release/knot_esp32_release_${{ inputs.action_date }}.uf2
dest: knot_release.zip
files: release/*_release_${{ inputs.action_date }}.uf2
dest: ${{ inputs.product_name }}_release.zip

- name: Create Production Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.release_version }}
name: Knot ${{ inputs.release_version }} (${{ inputs.action_date }})
files: knot_release.zip
name: ${{ inputs.product_name }} ${{ inputs.release_version }} (${{ inputs.action_date }})
files: ${{ inputs.product_name }}_release.zip
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .github/workflows/firmware_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
needs: build
uses: ./.github/workflows/firmware_release_production.yml
with:
product_name: "knot"
release_version: ${{ needs.build.outputs.release_version }}
action_date: ${{ needs.build.outputs.action_date }}
secrets: inherit
Expand All @@ -29,6 +30,8 @@ jobs:
if: github.ref == 'refs/heads/main' || needs.build.outputs.release_version != ''
needs: build
uses: ./.github/workflows/firmware_release_nightly.yml
with:
product_name: "knot"
secrets: inherit

deploy-preview:
Expand Down