diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index fb65ae1..85946a1 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -74,19 +74,14 @@ jobs: rm -f certificate.p12 - name: Rename artifacts to include release number run: | - mv dist/filen-cli-win-x64.exe dist/filen-cli-${{ github.event.release.tag_name }}-win-x64.exe - mv dist/filen-cli-win-arm64.exe dist/filen-cli-${{ github.event.release.tag_name }}-win-arm64.exe - mv dist/filen-cli-linux-x64 dist/filen-cli-${{ github.event.release.tag_name }}-linux-x64 - mv dist/filen-cli-linux-arm64 dist/filen-cli-${{ github.event.release.tag_name }}-linux-arm64 - mv dist/filen-cli-macos-x64 dist/filen-cli-${{ github.event.release.tag_name }}-macos-x64 - mv dist/filen-cli-macos-arm64 dist/filen-cli-${{ github.event.release.tag_name }}-macos-arm64 + # move files only if they exist + [ ! -f dist/filen-cli-win-x64.exe ] || mv dist/filen-cli-win-x64.exe dist/filen-cli-${{ github.event.release.tag_name }}-win-x64.exe + [ ! -f dist/filen-cli-win-arm64.exe ] || mv dist/filen-cli-win-arm64.exe dist/filen-cli-${{ github.event.release.tag_name }}-win-arm64.exe + [ ! -f dist/filen-cli-linux-x64 ] || mv dist/filen-cli-linux-x64 dist/filen-cli-${{ github.event.release.tag_name }}-linux-x64 + [ ! -f dist/filen-cli-linux-arm64 ] || mv dist/filen-cli-linux-arm64 dist/filen-cli-${{ github.event.release.tag_name }}-linux-arm64 + [ ! -f dist/filen-cli-macos-x64 ] || mv dist/filen-cli-macos-x64 dist/filen-cli-${{ github.event.release.tag_name }}-macos-x64 + [ ! -f dist/filen-cli-macos-arm64 ] || mv dist/filen-cli-macos-arm64 dist/filen-cli-${{ github.event.release.tag_name }}-macos-arm64 - name: Attach artifacts to release uses: softprops/action-gh-release@v2 with: - files: | - dist/filen-cli-${{ github.event.release.tag_name }}-win-x64.exe - dist/filen-cli-${{ github.event.release.tag_name }}-win-arm64.exe - dist/filen-cli-${{ github.event.release.tag_name }}-linux-x64 - dist/filen-cli-${{ github.event.release.tag_name }}-linux-arm64 - dist/filen-cli-${{ github.event.release.tag_name }}-macos-x64 - dist/filen-cli-${{ github.event.release.tag_name }}-macos-arm64 + files: dist/filen-cli-${{ github.event.release.tag_name }}-*