mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2025-12-23 22:18:39 -05:00
Fix frontend workflow using assets instead of cache (#376)
This commit is contained in:
20
.github/workflows/build-executable.yml
vendored
20
.github/workflows/build-executable.yml
vendored
@@ -4,21 +4,8 @@ on:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
# Build frontend once and share with all platform builds
|
||||
restore-frontend:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Restore frontend from cache
|
||||
id: restore-frontend
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: code/frontend/dist/ui/browser
|
||||
key: frontend-dist-${{ github.sha }}-${{ github.run_id }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
# Build for each platform in parallel using matrix strategy
|
||||
build-platform:
|
||||
needs: restore-frontend
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: true
|
||||
@@ -89,12 +76,11 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-nuget-
|
||||
|
||||
- name: Restore frontend from cache
|
||||
uses: actions/cache/restore@v4
|
||||
- name: Download frontend artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: frontend-dist
|
||||
path: code/frontend/dist/ui/browser
|
||||
key: frontend-dist-${{ github.sha }}-${{ github.run_id }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: Install dependencies and restore
|
||||
run: |
|
||||
|
||||
8
.github/workflows/build-frontend.yml
vendored
8
.github/workflows/build-frontend.yml
vendored
@@ -38,9 +38,9 @@ jobs:
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
- name: Cache frontend build
|
||||
id: cache-frontend
|
||||
uses: actions/cache/save@v4
|
||||
- name: Upload frontend artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: frontend-dist
|
||||
path: code/frontend/dist/ui/browser
|
||||
key: frontend-dist-${{ github.sha }}-${{ github.run_id }}
|
||||
retention-days: 1
|
||||
|
||||
8
.github/workflows/build-macos-installer.yml
vendored
8
.github/workflows/build-macos-installer.yml
vendored
@@ -68,13 +68,11 @@ jobs:
|
||||
token: ${{ env.REPO_READONLY_PAT }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Restore frontend from cache
|
||||
id: restore-frontend
|
||||
uses: actions/cache/restore@v4
|
||||
- name: Download frontend artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: frontend-dist
|
||||
path: code/frontend/dist/ui/browser
|
||||
key: frontend-dist-${{ github.sha }}-${{ github.run_id }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
|
||||
@@ -50,13 +50,11 @@ jobs:
|
||||
ref: ${{ github.ref_name }}
|
||||
token: ${{ env.REPO_READONLY_PAT }}
|
||||
|
||||
- name: Restore frontend from cache
|
||||
id: restore-frontend
|
||||
uses: actions/cache/restore@v4
|
||||
- name: Download frontend artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: frontend-dist
|
||||
path: code/frontend/dist/ui/browser
|
||||
key: frontend-dist-${{ github.sha }}-${{ github.run_id }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
|
||||
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@@ -10,6 +10,11 @@ on:
|
||||
description: 'Version to release (e.g., 1.0.0)'
|
||||
required: false
|
||||
default: ''
|
||||
skip_docker:
|
||||
description: 'Skip Docker build and push'
|
||||
type: boolean
|
||||
required: false
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
# Validate release
|
||||
@@ -19,7 +24,7 @@ jobs:
|
||||
app_version: ${{ steps.version.outputs.app_version }}
|
||||
release_version: ${{ steps.version.outputs.release_version }}
|
||||
is_tag: ${{ steps.version.outputs.is_tag }}
|
||||
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -47,7 +52,7 @@ jobs:
|
||||
echo "app_version=$app_version" >> $GITHUB_OUTPUT
|
||||
echo "release_version=$release_version" >> $GITHUB_OUTPUT
|
||||
echo "is_tag=$is_tag" >> $GITHUB_OUTPUT
|
||||
|
||||
|
||||
echo "🏷️ Release Version: $release_version"
|
||||
echo "📱 App Version: $app_version"
|
||||
echo "🔖 Is Tag: $is_tag"
|
||||
@@ -84,6 +89,7 @@ jobs:
|
||||
|
||||
# Build and push Docker image(s)
|
||||
build-docker:
|
||||
if: ${{ github.event.inputs.skip_docker != 'true' }}
|
||||
needs: [validate, test]
|
||||
uses: ./.github/workflows/build-docker.yml
|
||||
secrets: inherit
|
||||
|
||||
Reference in New Issue
Block a user