forked from smplman/sn32f240b-keyboard-bootloader
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
51 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,65 @@ | ||
name: Compile Firmware | ||
name: Compile Bootloaders | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
branches: [ master ] | ||
release: | ||
types: | ||
- published | ||
pull_request: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Build: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
container: debian:bullseye | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build jumploaders | ||
run: sh build.sh | ||
|
||
- uses: actions/upload-artifact@v2 | ||
- name: Find artifact files | ||
run: find build/ -type f -name "*.bin" > artifact_files.txt | ||
|
||
- name: Print files for debugging | ||
run: cat artifact_files.txt | ||
|
||
- name: Prepare artifact paths | ||
id: prepare | ||
run: | | ||
# Convert the list of files into a space-separated list | ||
artifact_paths=$(awk '{printf "%s ", $0}' artifact_files.txt) | ||
# Remove the trailing space | ||
artifact_paths=$(echo "$artifact_paths" | sed 's/ $//') | ||
echo "artifact_paths=${artifact_paths}" >> $GITHUB_ENV | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Pre-Compiled Jumploaders | ||
path: 'build/*.bin' | ||
path: ${{ env.artifact_paths }} | ||
if-no-files-found: error | ||
include-hidden-files: false | ||
|
||
publish_release: | ||
name: Publish (Release) | ||
runs-on: ubuntu-latest | ||
|
||
needs: [build] | ||
|
||
if: github.event.release.tag_name | ||
|
||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: Pre-Compiled Jumploaders | ||
path: build/ | ||
|
||
- uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
name: Release ${{ github.ref_name }} | ||
files: build/*.bin | ||
fail_on_unmatched_files: true |