diff --git a/.github/workflows/firmware_release_nightly.yml b/.github/workflows/firmware_release_nightly.yml index f6630a9..2b86fcf 100644 --- a/.github/workflows/firmware_release_nightly.yml +++ b/.github/workflows/firmware_release_nightly.yml @@ -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: @@ -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: | @@ -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 @@ -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}} diff --git a/.github/workflows/firmware_release_production.yml b/.github/workflows/firmware_release_production.yml index affa6f3..d0e8a9f 100644 --- a/.github/workflows/firmware_release_production.yml +++ b/.github/workflows/firmware_release_production.yml @@ -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 @@ -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 @@ -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 }} diff --git a/.github/workflows/firmware_workflow.yml b/.github/workflows/firmware_workflow.yml index 1aa651e..6e25593 100644 --- a/.github/workflows/firmware_workflow.yml +++ b/.github/workflows/firmware_workflow.yml @@ -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 @@ -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: