From 3fa3b43051a7241a9416cacc17472e3f2c717e29 Mon Sep 17 00:00:00 2001 From: wilinz Date: Mon, 22 Jan 2024 19:05:56 +0800 Subject: [PATCH] update github action --- .github/workflows/build-linux-release.yml | 13 ++++++++++--- .github/workflows/build-macos-release.yml | 5 ++++- .github/workflows/build-windows-release.yml | 9 +++++++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-linux-release.yml b/.github/workflows/build-linux-release.yml index a60e3eb..ab06a32 100644 --- a/.github/workflows/build-linux-release.yml +++ b/.github/workflows/build-linux-release.yml @@ -21,17 +21,24 @@ jobs: - name: Build Compose Desktop run: | - chmod 0777 ./gradlew + chmod +x ./gradlew ./gradlew packageDeb ./gradlew packageRpm ls build/compose/binaries/main + - name: Rename + run: | + cd build/compose/binaries/main/deb + for file in *.deb; do mv "$file" "$(basename "$file" .deb)-linux.deb"; done + cd ../rpm + for file in *.rpm; do mv "$file" "$(basename "$file" .rpm)-linux.rpm"; done + - name: Upload to Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: files: | - build/compose/binaries/main/deb/* - build/compose/binaries/main/rpm/* + build/compose/binaries/main/deb/* + build/compose/binaries/main/rpm/* env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build-macos-release.yml b/.github/workflows/build-macos-release.yml index a33c267..aa26abd 100644 --- a/.github/workflows/build-macos-release.yml +++ b/.github/workflows/build-macos-release.yml @@ -21,9 +21,12 @@ jobs: - name: Build Compose Desktop run: | - chmod 0777 ./gradlew + chmod +x ./gradlew ./gradlew packageDmg + - name: Rename DMG file + run: mv build/compose/binaries/main/dmg/*.dmg build/compose/binaries/main/dmg/*-macos.dmg + - name: Upload to Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') diff --git a/.github/workflows/build-windows-release.yml b/.github/workflows/build-windows-release.yml index 5626dbf..ab1eef7 100644 --- a/.github/workflows/build-windows-release.yml +++ b/.github/workflows/build-windows-release.yml @@ -36,12 +36,17 @@ jobs: - name: Package as exe run: iscc innosetup/setup.iss + - name: Rename files + run: | + Get-ChildItem -Path "build\compose\binaries\main\msi\" -Filter "*.msi" | Rename-Item -NewName { $_.Name -replace '\.msi$', '-windows.msi' } + Get-ChildItem -Path "innosetup\output\release\" -Filter "*.exe" | Rename-Item -NewName { $_.Name -replace '\.exe$', '-windows.exe' } + - name: Upload to Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: files: | - build/compose/binaries/main/msi/*.msi - innosetup/output/release/*.exe + build/compose/binaries/main/msi/*-windows.msi + innosetup/output/release/*-windows.exe env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}