From be2ffb0ee1aeadfb6e09ec7f39d8f65d8bcdd850 Mon Sep 17 00:00:00 2001 From: dingo35 Date: Thu, 23 May 2024 10:53:19 +0200 Subject: [PATCH] revert yaml to v3.5.1 so we can generate asset --- .github/workflows/pio-build.yaml | 46 +++++++----------------------- .github/workflows/pio-release.yaml | 21 -------------- 2 files changed, 11 insertions(+), 56 deletions(-) diff --git a/.github/workflows/pio-build.yaml b/.github/workflows/pio-build.yaml index 685ae9d0..87a1e7c8 100644 --- a/.github/workflows/pio-build.yaml +++ b/.github/workflows/pio-build.yaml @@ -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 }} diff --git a/.github/workflows/pio-release.yaml b/.github/workflows/pio-release.yaml index d4dff0dd..af656c03 100644 --- a/.github/workflows/pio-release.yaml +++ b/.github/workflows/pio-release.yaml @@ -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 @@ -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