mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-04-28 23:16:44 +00:00
Add files via upload
This commit is contained in:
101
.github/workflows/release.yml
vendored
101
.github/workflows/release.yml
vendored
@@ -13,42 +13,8 @@ env:
|
|||||||
ELECTRON_BUILDER_BINARIES_MIRROR: https://github.com/electron-userland/electron-builder-binaries/releases/download/
|
ELECTRON_BUILDER_BINARIES_MIRROR: https://github.com/electron-userland/electron-builder-binaries/releases/download/
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare-release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out git repository
|
|
||||||
uses: actions/checkout@v5
|
|
||||||
with:
|
|
||||||
fetch-depth: 1
|
|
||||||
|
|
||||||
- name: Ensure GitHub release exists
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
source .github/scripts/release-utils.sh
|
|
||||||
|
|
||||||
TAG="$GITHUB_REF_NAME"
|
|
||||||
REPO="$GITHUB_REPOSITORY"
|
|
||||||
VERSION="${TAG#v}"
|
|
||||||
prerelease_args=()
|
|
||||||
if [[ "$VERSION" == *-* ]]; then
|
|
||||||
prerelease_args+=(--prerelease)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if gh release view "$TAG" --repo "$REPO" >/dev/null 2>&1; then
|
|
||||||
retry_cmd 5 3 gh release edit "$TAG" --repo "$REPO" --draft=false "${prerelease_args[@]}"
|
|
||||||
else
|
|
||||||
retry_cmd 5 3 gh release create "$TAG" --repo "$REPO" --title "$TAG" --notes "Release $TAG" --target "$GITHUB_SHA" "${prerelease_args[@]}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
wait_for_release_id "$REPO" "$TAG" 12 2 >/dev/null
|
|
||||||
|
|
||||||
release-mac-arm64:
|
release-mac-arm64:
|
||||||
runs-on: macos-14
|
runs-on: macos-14
|
||||||
needs: prepare-release
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out git repository
|
- name: Check out git repository
|
||||||
@@ -77,29 +43,19 @@ jobs:
|
|||||||
npx tsc
|
npx tsc
|
||||||
npx vite build
|
npx vite build
|
||||||
|
|
||||||
- name: Package and Upload macOS arm64 (unsigned DMG + ZIP)
|
- name: Package and Publish macOS arm64 (unsigned DMG + ZIP)
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
CSC_IDENTITY_AUTO_DISCOVERY: "false"
|
CSC_IDENTITY_AUTO_DISCOVERY: "false"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
source .github/scripts/release-utils.sh
|
|
||||||
export ELECTRON_BUILDER_BINARIES_MIRROR="https://github.com/electron-userland/electron-builder-binaries/releases/download/"
|
export ELECTRON_BUILDER_BINARIES_MIRROR="https://github.com/electron-userland/electron-builder-binaries/releases/download/"
|
||||||
echo "Using ELECTRON_BUILDER_BINARIES_MIRROR=$ELECTRON_BUILDER_BINARIES_MIRROR"
|
echo "Using ELECTRON_BUILDER_BINARIES_MIRROR=$ELECTRON_BUILDER_BINARIES_MIRROR"
|
||||||
if ! npx electron-builder --mac dmg zip --arm64 --publish never '--config.publish.owner=${{ github.repository_owner }}' '--config.publish.repo=${{ github.event.repository.name }}'; then
|
if ! npx electron-builder --mac dmg zip --arm64 --publish always '--config.publish.owner=${{ github.repository_owner }}' '--config.publish.repo=${{ github.event.repository.name }}'; then
|
||||||
echo "::warning::DMG packaging failed (hdiutil instability on runner). Retrying with ZIP only."
|
echo "::warning::DMG packaging failed (hdiutil instability on runner). Retrying with ZIP only."
|
||||||
npx electron-builder --mac zip --arm64 --publish never '--config.publish.owner=${{ github.repository_owner }}' '--config.publish.repo=${{ github.event.repository.name }}'
|
npx electron-builder --mac zip --arm64 --publish always '--config.publish.owner=${{ github.repository_owner }}' '--config.publish.repo=${{ github.event.repository.name }}'
|
||||||
fi
|
fi
|
||||||
assets=()
|
|
||||||
while IFS= read -r file; do
|
|
||||||
assets+=("$file")
|
|
||||||
done < <(find release -maxdepth 1 -type f | sort)
|
|
||||||
if [ "${#assets[@]}" -eq 0 ]; then
|
|
||||||
echo "No release files found in ./release"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
upload_release_assets_with_retry "$GITHUB_REPOSITORY" "$GITHUB_REF_NAME" "${assets[@]}"
|
|
||||||
|
|
||||||
- name: Inject minimumVersion into latest yml
|
- name: Inject minimumVersion into latest yml
|
||||||
env:
|
env:
|
||||||
@@ -125,7 +81,6 @@ jobs:
|
|||||||
|
|
||||||
release-linux:
|
release-linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: prepare-release
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out git repository
|
- name: Check out git repository
|
||||||
@@ -159,23 +114,11 @@ jobs:
|
|||||||
npx tsc
|
npx tsc
|
||||||
npx vite build
|
npx vite build
|
||||||
|
|
||||||
- name: Package and Upload Linux
|
- name: Package and Publish Linux
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
npx electron-builder --linux --publish always '--config.publish.owner=${{ github.repository_owner }}' '--config.publish.repo=${{ github.event.repository.name }}'
|
||||||
source .github/scripts/release-utils.sh
|
|
||||||
npx electron-builder --linux --publish never '--config.publish.owner=${{ github.repository_owner }}' '--config.publish.repo=${{ github.event.repository.name }}'
|
|
||||||
assets=()
|
|
||||||
while IFS= read -r file; do
|
|
||||||
assets+=("$file")
|
|
||||||
done < <(find release -maxdepth 1 -type f | sort)
|
|
||||||
if [ "${#assets[@]}" -eq 0 ]; then
|
|
||||||
echo "No release files found in ./release"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
upload_release_assets_with_retry "$GITHUB_REPOSITORY" "$GITHUB_REF_NAME" "${assets[@]}"
|
|
||||||
|
|
||||||
- name: Inject minimumVersion into latest yml
|
- name: Inject minimumVersion into latest yml
|
||||||
env:
|
env:
|
||||||
@@ -196,7 +139,6 @@ jobs:
|
|||||||
|
|
||||||
release:
|
release:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: prepare-release
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out git repository
|
- name: Check out git repository
|
||||||
@@ -225,23 +167,11 @@ jobs:
|
|||||||
npx tsc
|
npx tsc
|
||||||
npx vite build
|
npx vite build
|
||||||
|
|
||||||
- name: Package and Upload Windows x64
|
- name: Package and Publish
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
npx electron-builder --win nsis --x64 --publish always '--config.publish.owner=${{ github.repository_owner }}' '--config.publish.repo=${{ github.event.repository.name }}' '--config.artifactName=${productName}-${version}-x64-Setup.${ext}'
|
||||||
source .github/scripts/release-utils.sh
|
|
||||||
npx electron-builder --win nsis --x64 --publish never '--config.publish.owner=${{ github.repository_owner }}' '--config.publish.repo=${{ github.event.repository.name }}' '--config.artifactName=${productName}-${version}-x64-Setup.${ext}'
|
|
||||||
assets=()
|
|
||||||
while IFS= read -r file; do
|
|
||||||
assets+=("$file")
|
|
||||||
done < <(find release -maxdepth 1 -type f | sort)
|
|
||||||
if [ "${#assets[@]}" -eq 0 ]; then
|
|
||||||
echo "No release files found in ./release"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
upload_release_assets_with_retry "$GITHUB_REPOSITORY" "$GITHUB_REF_NAME" "${assets[@]}"
|
|
||||||
|
|
||||||
- name: Inject minimumVersion into latest yml
|
- name: Inject minimumVersion into latest yml
|
||||||
env:
|
env:
|
||||||
@@ -262,7 +192,6 @@ jobs:
|
|||||||
|
|
||||||
release-windows-arm64:
|
release-windows-arm64:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: prepare-release
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out git repository
|
- name: Check out git repository
|
||||||
@@ -291,23 +220,11 @@ jobs:
|
|||||||
npx tsc
|
npx tsc
|
||||||
npx vite build
|
npx vite build
|
||||||
|
|
||||||
- name: Package and Upload Windows arm64
|
- name: Package and Publish Windows arm64
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
npx electron-builder --win nsis --arm64 --publish always '--config.publish.owner=${{ github.repository_owner }}' '--config.publish.repo=${{ github.event.repository.name }}' '--config.publish.channel=latest-arm64' '--config.artifactName=${productName}-${version}-arm64-Setup.${ext}'
|
||||||
source .github/scripts/release-utils.sh
|
|
||||||
npx electron-builder --win nsis --arm64 --publish never '--config.publish.owner=${{ github.repository_owner }}' '--config.publish.repo=${{ github.event.repository.name }}' '--config.publish.channel=latest-arm64' '--config.artifactName=${productName}-${version}-arm64-Setup.${ext}'
|
|
||||||
assets=()
|
|
||||||
while IFS= read -r file; do
|
|
||||||
assets+=("$file")
|
|
||||||
done < <(find release -maxdepth 1 -type f | sort)
|
|
||||||
if [ "${#assets[@]}" -eq 0 ]; then
|
|
||||||
echo "No release files found in ./release"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
upload_release_assets_with_retry "$GITHUB_REPOSITORY" "$GITHUB_REF_NAME" "${assets[@]}"
|
|
||||||
|
|
||||||
- name: Inject minimumVersion into latest yml
|
- name: Inject minimumVersion into latest yml
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user