Skip to content

Commit

Permalink
Add preparation command, update versions of workflows. (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
tzarc authored May 21, 2024
1 parent 403cb25 commit fe75612
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/qmk_userspace_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
default: "master"
required: false
type: string
preparation_command:
description: "command to execute before `qmk userspace-compile`"
default: ""
required: false
type: string

permissions:
contents: write
Expand All @@ -25,19 +30,19 @@ jobs:

steps:
- name: Checkout Userspace
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ github.token }}
submodules: recursive

- name: Check if qmk_firmware exists
id: check_files
uses: andstor/file-existence-action@v2
uses: andstor/file-existence-action@v3
with:
files: qmk_firmware

- name: Checkout QMK Firmware
uses: actions/checkout@v3
uses: actions/checkout@v4
if: steps.check_files.outputs.files_exists == 'false'
with:
token: ${{ github.token }}
Expand All @@ -61,6 +66,11 @@ jobs:
run: |
qmk userspace-doctor
- name: Preparation command
if: inputs.preparation_command != ''
run: |
${{ inputs.preparation_command }}
- name: Build
run: |
qmk userspace-compile -e DUMP_CI_METADATA=yes || touch .failed
Expand All @@ -72,7 +82,7 @@ jobs:
[ ! -f .failed ] || exit 1
- name: Upload binaries
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always() && !cancelled()
continue-on-error: true
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/qmk_userspace_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ jobs:
steps:
- name: Download binaries
if: always() && !cancelled()
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Firmware

- name: Generate Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
if: always() && !cancelled()
with:
token: ${{ github.token }}
Expand Down

0 comments on commit fe75612

Please sign in to comment.