Skip to content

Commit

Permalink
revert yaml to v3.5.1 so we can generate asset
Browse files Browse the repository at this point in the history
  • Loading branch information
dingo35 committed May 23, 2024
1 parent 1787721 commit be2ffb0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 56 deletions.
46 changes: 11 additions & 35 deletions .github/workflows/pio-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,57 +76,33 @@ jobs:
cd SmartEVSE-3
pio lib install
- name: Build normal version
env:
super_secret: ${{ secrets.SECRET_KEY }}
run: |
PLATFORMIO_BUILD_FLAGS='-DVERSION=\"v${{ steps.version.outputs.version }}\" -DDBG=0' pio run -d SmartEVSE-3/
cd sign_firmware
make sign
# Create a temporary file
secret_file=$(mktemp)
# Write the secret to the temporary file, because passing it as command line argument might reveal it for users using ps -a
echo "$super_secret" > "$secret_file"
# Pass the secret to the command via stdin
cat "$secret_file" | ./sign
# Remove the temporary file
rm -f "$secret_file"
cd ..
- name: Upload firmware.bin
run: PLATFORMIO_BUILD_FLAGS='-DVERSION=\"v${{ steps.version.outputs.version }}\" -DDBG=0' pio run -d SmartEVSE-3/
- name: Build spiffs
run: PLATFORMIO_BUILD_FLAGS='-DVERSION=\"v${{ steps.version.outputs.version }}\" -DDBG=0' pio run -d SmartEVSE-3/ -t buildfs
- id: artifact
run: echo "value=dist-${{ steps.branch.outputs.branch }}-${{ steps.datetime.outputs.datetime }}" >> $GITHUB_OUTPUT
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: dists_zip
name: ${{ steps.artifact.outputs.value }}
path: ./SmartEVSE-3/.pio/build/release/*.bin
retention-days: 10
- name: Upload HowToFlash.txt
uses: actions/upload-artifact@v3
with:
name: dists_zip
name: ${{ steps.artifact.outputs.value }}
path: ./SmartEVSE-3/HowToFlash.txt
retention-days: 10
- name: Build debug version
env:
super_secret: ${{ secrets.SECRET_KEY }}
run: |
PLATFORMIO_BUILD_FLAGS='-DVERSION=\"v${{ steps.version.outputs.version }}\" -DDBG=1' pio run -d SmartEVSE-3/
cd sign_firmware
make sign
# Create a temporary file
secret_file=$(mktemp)
# Write the secret to the temporary file, because passing it as command line argument might reveal it for users using ps -a
echo "$super_secret" > "$secret_file"
# Pass the secret to the command via stdin
cat "$secret_file" | ./sign
# Remove the temporary file
rm -f "$secret_file"
cd ..
mv ./SmartEVSE-3/.pio/build/release/firmware.bin ./SmartEVSE-3/.pio/build/release/firmware.debug.bin
mv ./SmartEVSE-3/.pio/build/release/firmware.signed.bin ./SmartEVSE-3/.pio/build/release/firmware.debug.signed.bin
- name: Upload Artifact debug firmware
uses: actions/upload-artifact@v3
with:
name: dists_zip
path: ./SmartEVSE-3/.pio/build/release/*.bin
name: ${{ steps.artifact.outputs.value }}
path: ./SmartEVSE-3/.pio/build/release/firmware.debug.bin
retention-days: 10

outputs:
artifact: dists_zip
artifact: ${{ steps.artifact.outputs.value }}
21 changes: 0 additions & 21 deletions .github/workflows/pio-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
minor: ${{ needs.version.outputs.minor }}
patch: ${{ needs.version.outputs.patch }}
prerelease: ${{ needs.version.outputs.prerelease }}
secrets: inherit
release:
permissions: write-all
needs: build
Expand Down Expand Up @@ -60,24 +59,4 @@ jobs:
asset_path: ./${{ steps.tag.outputs.tag }}-dist.zip
asset_name: ${{ steps.tag.outputs.tag }}-dist.zip
asset_content_type: application/zip
- name: Upload Release Asset2
id: upload-release-asset2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/${{ needs.build.outputs.artifact }}/firmware.signed.bin
asset_name: firmware.signed.bin
asset_content_type: application/octet-stream
- name: Upload Release Asset3
id: upload-release-asset3
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/${{ needs.build.outputs.artifact }}/firmware.debug.signed.bin
asset_name: firmware.debug.signed.bin
asset_content_type: application/octet-stream

0 comments on commit be2ffb0

Please sign in to comment.