Skip to content

Commit

Permalink
firmware: version stamp the firmware artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
dinoboards committed Nov 21, 2024
1 parent 46f5027 commit 9a36c03
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/ez80-for-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ jobs:
with:
submodules: true

- name: Read version numbers
id: read_version
run: |
MAJOR_VERSION=$(grep 'MAJOR_VERSION' ./firmware/src/version.inc | awk '{print $3}')
MINOR_VERSION=$(grep 'MINOR_VERSION' ./firmware/src/version.inc | awk '{print $3}')
PATCH_VERSION=$(grep 'PATCH_VERSION' ./firmware/src/version.inc | awk '{print $3}')
REVISION_VERSION=$(grep 'REVISION_VERSION' ./firmware/src/version.inc | awk '{print $3}')
echo "MAJOR_VERSION=$MAJOR_VERSION" >> $GITHUB_ENV
echo "MINOR_VERSION=$MINOR_VERSION" >> $GITHUB_ENV
echo "PATCH_VERSION=$PATCH_VERSION" >> $GITHUB_ENV
echo "REVISION_VERSION=$REVISION_VERSION" >> $GITHUB_ENV
- name: pull docker tool chain
run: |
docker pull dinoboards/ez80-rc-builder:0.0.1
Expand All @@ -62,23 +74,23 @@ jobs:
uses: actions/upload-artifact@v4
with:
compression-level: 0
name: firmware
name: firmware-${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ env.PATCH_VERSION }}.${{ env.REVISION_VERSION }}
path: |
firmware/bin
- name: Release HEX file
uses: actions/upload-artifact@v4
with:
compression-level: 0
name: z80-rc-firmware-release.hex
name: ez80-rc-firmware-release.hex
path: |
firmware/bin/ez80-rc-firmware-release.hex
- name: Version File
- name: Firmware Version File
uses: actions/upload-artifact@v4
with:
compression-level: 0
name: version.inc
name: firmware-version.inc
path: |
firmware/src/version.inc
Expand All @@ -92,16 +104,16 @@ jobs:
with:
submodules: true

- name: copy z80-rc-firmware-release.hex
- name: copy ez80-rc-firmware-release.hex
uses: actions/download-artifact@v4
with:
name: z80-rc-firmware-release.hex
name: ez80-rc-firmware-release.hex
path: programmer/build/

- name: copy version.inc
uses: actions/download-artifact@v4
with:
name: version.inc
name: firmware-version.inc
path: programmer/

- name: pull docker tool chain
Expand Down

0 comments on commit 9a36c03

Please sign in to comment.