feat(build): Add release workflow steps
* Add additional steps to publish firmware artifacts as a release in the user repository. * User can disable the feature and also customise the name and tag.
This commit is contained in:
parent
2c50cff891
commit
2bdbd470bb
1 changed files with 37 additions and 0 deletions
37
.github/workflows/build-user-config.yml
vendored
37
.github/workflows/build-user-config.yml
vendored
|
@ -23,6 +23,21 @@ on:
|
||||||
default: "firmware"
|
default: "firmware"
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
release_enable:
|
||||||
|
description: "Enable publishing of artifacts as a release"
|
||||||
|
default: true
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
release_name:
|
||||||
|
description: "Release name"
|
||||||
|
default: "ZMK Firmware"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
release_tag:
|
||||||
|
description: "Release tag"
|
||||||
|
default: "latest"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -161,3 +176,25 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.archive_name }}
|
name: ${{ inputs.archive_name }}
|
||||||
path: ${{ env.build_dir }}/artifacts
|
path: ${{ env.build_dir }}/artifacts
|
||||||
|
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ inputs.release_enable && !cancelled() }}
|
||||||
|
needs: build
|
||||||
|
name: Publish firmware
|
||||||
|
steps:
|
||||||
|
- name: Delete previous release
|
||||||
|
uses: dev-drprasad/delete-tag-and-release@v1.0.1
|
||||||
|
with:
|
||||||
|
tag_name: ${{ inputs.release_tag }}
|
||||||
|
github_token: ${{ github.token }}
|
||||||
|
|
||||||
|
- name: Download artifact
|
||||||
|
uses: actions/download-artifact@v3.0.2
|
||||||
|
|
||||||
|
- name: Publish ${{ inputs.release_tag }} release
|
||||||
|
uses: softprops/action-gh-release@v0.1.15
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.release_name }}
|
||||||
|
tag_name: ${{ inputs.release_tag }}
|
||||||
|
files: "**/*.*"
|
||||||
|
|
Loading…
Add table
Reference in a new issue