|
18 | 18 |
|
19 | 19 | env: |
20 | 20 | # MicroPython version will be contained in github.event.release.tag_name for releases |
21 | | - RELEASE_FILE: ${{ matrix.name }}-${{ github.event.release.tag_name || github.sha }}-micropython |
| 21 | + CI_RELEASE_FILENAME: ${{ matrix.name }}-${{ github.event.release.tag_name || github.sha }}-micropython |
22 | 22 | CI_PROJECT_ROOT: ${{ github.workspace }}/src-${{ github.sha }} |
23 | 23 | CI_BUILD_ROOT: ${{ github.workspace }} |
24 | 24 | CI_USE_ENV: 1 |
@@ -70,29 +70,28 @@ jobs: |
70 | 70 | python3 -m venv "$CI_BUILD_ROOT/.dir2uf2" |
71 | 71 | source "$CI_BUILD_ROOT/.dir2uf2/bin/activate" |
72 | 72 | ci_cmake_build ${{ matrix.name }} |
73 | | - mv "$CI_BUILD_ROOT/${{ matrix.name }}.uf2" "$CI_BUILD_ROOT/$RELEASE_FILE.uf2" |
74 | | - mv "$CI_BUILD_ROOT/${{ matrix.name }}-with-filesystem.uf2" "$CI_BUILD_ROOT/$RELEASE_FILE-with-filesystem.uf2" |
75 | 73 |
|
76 | 74 | - name: "Artifacts: Upload .uf2" |
77 | 75 | uses: actions/upload-artifact@v4 |
78 | 76 | with: |
79 | | - name: ${{ env.RELEASE_FILE }}.uf2 |
80 | | - path: ${{ env.CI_BUILD_ROOT }}/${{ env.RELEASE_FILE }}.uf2 |
| 77 | + name: ${{ env.CI_RELEASE_FILENAME }}.uf2 |
| 78 | + path: ${{ env.CI_BUILD_ROOT }}/${{ env.CI_RELEASE_FILENAME }}.uf2 |
81 | 79 |
|
82 | 80 | - name: "Artifacts: Upload .uf2 (With Filesystem)" |
83 | 81 | uses: actions/upload-artifact@v4 |
84 | 82 | with: |
85 | | - name: ${{ env.RELEASE_FILE }}-with-filesystem.uf2 |
86 | | - path: ${{ env.CI_BUILD_ROOT }}/${{ env.RELEASE_FILE }}-with-filesystem.uf2 |
| 83 | + if-no-files-found: ignore |
| 84 | + name: ${{ env.CI_RELEASE_FILENAME }}-with-filesystem.uf2 |
| 85 | + path: ${{ env.CI_BUILD_ROOT }}/${{ env.CI_RELEASE_FILENAME }}-with-filesystem.uf2 |
87 | 86 |
|
88 | 87 | - name: "Release: Upload .uf2" |
89 | 88 | if: github.event_name == 'release' |
90 | 89 | uses: softprops/action-gh-release@v1 |
91 | 90 | with: |
92 | | - files: ${{ env.CI_BUILD_ROOT }}/${{ env.RELEASE_FILE }}.uf2 |
| 91 | + files: ${{ env.CI_BUILD_ROOT }}/${{ env.CI_RELEASE_FILENAME }}.uf2 |
93 | 92 |
|
94 | 93 | - name: "Release: Upload .uf2 (With Filesystem)" |
95 | | - if: github.event_name == 'release' |
| 94 | + if: ${{ github.event_name == 'release' && hashFiles('${{ env.CI_BUILD_ROOT }}/${{ env.CI_RELEASE_FILENAME }}-with-filesystem.uf2') != '' }} |
96 | 95 | uses: softprops/action-gh-release@v1 |
97 | 96 | with: |
98 | | - files: ${{ env.CI_BUILD_ROOT }}/${{ env.RELEASE_FILE }}-with-filesystem.uf2 |
| 97 | + files: ${{ env.CI_BUILD_ROOT }}/${{ env.CI_RELEASE_FILENAME }}-with-filesystem.uf2 |
0 commit comments