Skip to content

Commit

Permalink
Append commit hash to version
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhiquan Yeo committed Oct 15, 2023
1 parent db1ed6c commit 7fbbef2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
run: |
FIRMWARE_VER=$(cat VERSION)
echo "FIRMWARE_VERSION=$FIRMWARE_VER" >> $GITHUB_ENV
- name: Get commit hash
id: commit_hash
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Set up Python
uses: actions/setup-python@v2
with:
Expand All @@ -26,8 +29,8 @@ jobs:
- name: Build
run: pio run
- name: Rename firmware
run: mv .pio/build/rpipicow/firmware.uf2 .pio/build/rpipicow/xrp-wpilib-firmware-${{ env.FIRMWARE_VERSION }}.uf2
run: mv .pio/build/rpipicow/firmware.uf2 .pio/build/rpipicow/xrp-wpilib-firmware-${{ env.FIRMWARE_VERSION }}-${{ steps.commit_hash.outputs.sha_short }}.uf2
- uses: actions/upload-artifact@v2
with:
name: xrp-wpilib-firmware-${{ env.FIRMWARE_VERSION }}
name: xrp-wpilib-firmware-${{ env.FIRMWARE_VERSION }}-${{ steps.commit_hash.outputs.sha_short }}
path: .pio/build/rpipicow/xrp-wpilib-firmware-*.uf2

0 comments on commit 7fbbef2

Please sign in to comment.