Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Blueforcer authored Mar 22, 2023
1 parent 4d637d2 commit d5964bc
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Extract version number
id: version_number
run: |
echo "::set-output name=library_version::$(grep '*VERSION' src/Settings.cpp | cut -d'=' -f2 | sed -r 's/"(.*)";/\1/' | awk '{$1=$1};1')"
echo "::set-output name=firmware_version::$(grep '*VERSION' src/Settings.cpp | cut -d'=' -f2 | sed -r 's/"(.*)";/\1/' | awk '{$1=$1};1')"
- name: Run PlatformIO
run: pio run
Expand All @@ -52,7 +52,7 @@ jobs:
run: cp .pio/build/esp32dev/firmware.bin ./flasher/firmware

- name: Create new manifest.json
run: cat flasher/firmware/manifest.json | jq '.version="${{ steps.version_number.outputs.library_version }}"' > flasher/firmware/new-manifest.json
run: cat flasher/firmware/manifest.json | jq '.version="${{ steps.version_number.outputs.firmware_version }}"' > flasher/firmware/new-manifest.json

- name: Override previous manifest.json
run: mv flasher/firmware/new-manifest.json flasher/firmware/manifest.json
Expand All @@ -75,6 +75,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Extract version number
id: version_number
run: |
echo "::set-output name=firmware_version::$(grep '*VERSION' src/Settings.cpp | cut -d'=' -f2 | sed -r 's/"(.*)";/\1/' | awk '{$1=$1};1')"
- name: Download firmware
uses: actions/download-artifact@v2
with:
Expand All @@ -87,8 +92,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version_number.outputs.library_version }}
release_name: Release ${{ steps.version_number.outputs.library_version }}
tag_name: ${{ steps.version_number.outputs.firmware_version }}
release_name: Release ${{ steps.version_number.outputs.firmware_version }}
draft: false
prerelease: false

Expand Down

0 comments on commit d5964bc

Please sign in to comment.