diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c0c37dc4..a348402b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,93 +41,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - cli-build: - name: Build CLI ${{ matrix.goos }}/${{ matrix.goarch }} - runs-on: ubuntu-latest - timeout-minutes: 45 - strategy: - fail-fast: false - matrix: - include: - - goos: linux - goarch: amd64 - - goos: linux - goarch: arm64 - - goos: darwin - goarch: amd64 - - goos: darwin - goarch: arm64 - - goos: windows - goarch: amd64 - - goos: windows - goarch: arm64 - steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - with: - version: 10 - - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: pnpm - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - cache: true - - name: Install JS dependencies - run: pnpm install --frozen-lockfile - - name: Build release archive - shell: bash - env: - COMMIT_HASH: ${{ github.sha }} - TARGET_OS: ${{ matrix.goos }} - TARGET_ARCH: ${{ matrix.goarch }} - run: | - set -euo pipefail - VERSION="${RELEASE_TAG#v}" - bash scripts/release.sh \ - --version "$VERSION" \ - --commit-hash "$COMMIT_HASH" \ - --os "$TARGET_OS" \ - --arch "$TARGET_ARCH" \ - --output-dir dist - - name: Upload CLI artifacts - uses: actions/upload-artifact@v4 - with: - name: cli-${{ matrix.goos }}-${{ matrix.goarch }} - path: | - dist/*.tar.gz - dist/*.zip - if-no-files-found: error - - cli-upload: - name: Upload CLI artifacts - runs-on: ubuntu-latest - needs: [changelog, cli-build] - if: ${{ always() && needs.cli-build.result == 'success' && (needs.changelog.result == 'success' || needs.changelog.result == 'skipped') }} - steps: - - name: Download CLI artifacts - uses: actions/download-artifact@v4 - with: - path: release-artifacts/cli - pattern: cli-* - merge-multiple: true - - name: Publish CLI assets - shell: bash - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GH_REPO: ${{ github.repository }} - TAG_NAME: ${{ env.RELEASE_TAG }} - run: | - set -euo pipefail - shopt -s nullglob - files=(release-artifacts/cli/*.tar.gz release-artifacts/cli/*.zip) - if [[ ${#files[@]} -eq 0 ]]; then - echo "No CLI artifacts found" >&2 - exit 1 - fi - gh release upload "$TAG_NAME" "${files[@]}" --clobber --repo "$GH_REPO" - desktop-build: name: Build desktop (${{ matrix.platform }}) runs-on: ${{ matrix.platform }} @@ -199,15 +112,12 @@ jobs: with: name: desktop-${{ matrix.platform }} path: | - apps/desktop/dist/**/*.AppImage - apps/desktop/dist/**/*.deb - apps/desktop/dist/**/*.rpm - apps/desktop/dist/**/*.dmg - apps/desktop/dist/**/*.zip - apps/desktop/dist/**/*.exe - apps/desktop/dist/**/*.msi - apps/desktop/dist/**/*.blockmap - apps/desktop/dist/**/latest*.yml + apps/desktop/dist/*.AppImage + apps/desktop/dist/*.deb + apps/desktop/dist/*.rpm + apps/desktop/dist/*.dmg + apps/desktop/dist/*.zip + apps/desktop/dist/*.exe if-no-files-found: error desktop-upload: @@ -230,17 +140,14 @@ jobs: TAG_NAME: ${{ env.RELEASE_TAG }} run: | set -euo pipefail - shopt -s nullglob globstar + shopt -s nullglob files=( - release-artifacts/desktop/**/*.AppImage - release-artifacts/desktop/**/*.deb - release-artifacts/desktop/**/*.rpm - release-artifacts/desktop/**/*.dmg - release-artifacts/desktop/**/*.zip - release-artifacts/desktop/**/*.exe - release-artifacts/desktop/**/*.msi - release-artifacts/desktop/**/*.blockmap - release-artifacts/desktop/**/latest*.yml + release-artifacts/desktop/*.AppImage + release-artifacts/desktop/*.deb + release-artifacts/desktop/*.rpm + release-artifacts/desktop/*.dmg + release-artifacts/desktop/*.zip + release-artifacts/desktop/*.exe ) if [[ ${#files[@]} -eq 0 ]]; then echo "No desktop artifacts found" >&2 diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml index f92b2b7d..0094997f 100644 --- a/apps/desktop/electron-builder.yml +++ b/apps/desktop/electron-builder.yml @@ -21,7 +21,7 @@ mac: - target: zip arch: [arm64, x64] icon: build/icon.icns - artifactName: ${productName}-${version}-${arch}.${ext} + artifactName: ${productName}-Desktop-${version}-mac-${arch}.${ext} notarize: false linux: category: Utility @@ -34,13 +34,13 @@ linux: arch: [x64] maintainer: Memoh icon: build/icon.png - artifactName: ${productName}-${version}-${arch}.${ext} + artifactName: ${productName}-Desktop-${version}-linux-${arch}.${ext} win: target: - target: nsis arch: [x64] icon: build/icon.ico - artifactName: ${productName}-${version}-${arch}-setup.${ext} + artifactName: ${productName}-Desktop-${version}-win-${arch}-setup.${ext} nsis: oneClick: false perMachine: false