mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
chore(release): drop server CLI bundle and rename desktop artifacts
- Remove cli-build / cli-upload jobs; server is distributed via Docker only. - Add Desktop + platform marker to electron-builder artifactName so files read e.g. Memoh-Desktop-<v>-mac-arm64.dmg / linux-x86_64.AppImage / win-x64-setup.exe. - Tighten desktop upload glob to apps/desktop/dist/*.<ext> so win-unpacked/ Memoh.exe and elevate.exe stop being picked up by **/*.exe. - Drop *.blockmap, latest*.yml, *.msi from upload list; auto-update is not used.
This commit is contained in:
+13
-106
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user