Skip to content

Commit

Permalink
chore: recover workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
idootop committed Nov 24, 2024
1 parent 7c5a36c commit 6c9dcea
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 91 deletions.
176 changes: 88 additions & 88 deletions .github/workflows/build-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,61 +3,61 @@ on:
workflow_dispatch:

jobs:
# build-for-macos:
# name: macOS
# permissions:
# contents: write
# strategy:
# fail-fast: false
# matrix:
# include:
# - target: universal-apple-darwin
# build: macos
# os: macos-latest
# arch: universal
# - target: aarch64-apple-darwin
# build: macos
# os: macos-latest
# arch: aarch64
# - target: x86_64-apple-darwin
# build: macos
# os: macos-latest
# arch: x86_64
build-for-macos:
name: macOS
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- target: universal-apple-darwin
build: macos
os: macos-latest
arch: universal
- target: aarch64-apple-darwin
build: macos
os: macos-latest
arch: aarch64
- target: x86_64-apple-darwin
build: macos
os: macos-latest
arch: x86_64

# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v4
# - name: Setup PNPM
# uses: pnpm/action-setup@v3
# with:
# version: 8.5.1
# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 20
# cache: "pnpm"
# cache-dependency-path: "pnpm-lock.yaml"
# - name: Setup Rust
# uses: dtolnay/rust-toolchain@stable
# with:
# toolchain: stable
# targets: ${{ matrix.arch == 'universal' && 'aarch64-apple-darwin,x86_64-apple-darwin' || matrix.target }}
# - name: Setup Rust Cache
# uses: swatinem/rust-cache@v2
# with:
# workspaces: './src-tauri -> target'
# - name: Build APP
# run: |
# pnpm install
# VERSION=$(node -p "require('./package.json').version")
# CI=false pnpm tauri build -c "{\"version\":\"$VERSION\"}" -t ${{ matrix.target }}
# APP_NAME="MagicMirror_${VERSION}_${{ matrix.build }}_${{ matrix.arch }}"
# node scripts/dist.js ${{ matrix.target }} $APP_NAME
# - name: Upload App
# uses: actions/upload-artifact@v4
# with:
# name: app_${{ matrix.build }}_${{ matrix.arch }}
# path: dist/MagicMirror_*
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v3
with:
version: 8.5.1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.arch == 'universal' && 'aarch64-apple-darwin,x86_64-apple-darwin' || matrix.target }}
- name: Setup Rust Cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Build APP
run: |
pnpm install
VERSION=$(node -p "require('./package.json').version")
CI=false pnpm tauri build -c "{\"version\":\"$VERSION\"}" -t ${{ matrix.target }}
APP_NAME="MagicMirror_${VERSION}_${{ matrix.build }}_${{ matrix.arch }}"
node scripts/dist.js ${{ matrix.target }} $APP_NAME
- name: Upload App
uses: actions/upload-artifact@v4
with:
name: app_${{ matrix.build }}_${{ matrix.arch }}
path: dist/MagicMirror_*

build-for-windows:
name: Windows
Expand Down Expand Up @@ -112,38 +112,38 @@ jobs:
name: app_${{ matrix.build }}_${{ matrix.arch }}
path: dist/MagicMirror_*

# release:
# name: Release
# needs: [build-for-macos, build-for-windows]
# runs-on: ubuntu-latest
release:
name: Release
needs: [build-for-macos, build-for-windows]
runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v4
# - name: Download Artifacts
# uses: actions/download-artifact@v4
# with:
# pattern: app_*
# path: dist
# merge-multiple: true
# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 20
# - name: Check Version
# id: version
# run: |
# VERSION=$(node -p "require('./package.json').version")
# echo "version=$VERSION" >> $GITHUB_OUTPUT
# - name: Release MagicMirror v${{ steps.version.outputs.version }}
# uses: ncipollo/release-action@v1
# with:
# allowUpdates: true
# token: ${{ secrets.GITHUB_TOKEN }}
# tag: app-v${{ steps.version.outputs.version }}
# name: MagicMirror v${{ steps.version.outputs.version }}
# body: MagicMirror APP v${{ steps.version.outputs.version }}
# draft: true
# prerelease: false
# makeLatest: latest
# removeArtifacts: true
# artifacts: dist/*
steps:
- uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
pattern: app_*
path: dist
merge-multiple: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Check Version
id: version
run: |
VERSION=$(node -p "require('./package.json').version")
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Release MagicMirror v${{ steps.version.outputs.version }}
uses: ncipollo/release-action@v1
with:
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}
tag: app-v${{ steps.version.outputs.version }}
name: MagicMirror v${{ steps.version.outputs.version }}
body: MagicMirror APP v${{ steps.version.outputs.version }}
draft: true
prerelease: false
makeLatest: latest
removeArtifacts: true
artifacts: dist/*
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Instant AI Face Swap, Hairstyles & Outfits — One click to a brand new you!

## Installation

> [👉 中文教程请戳这里](./README.zh-CN.md)
> [👉 中文教程和下载地址请戳这里](./README.zh-CN.md)
MagicMirror currently supports macOS and Windows:

1. [Download](https://github.com/idootop/MagicMirror/releases/tag/app-v1.0.0)
2. [Usage Guide](https://thread-sphynx-f26.notion.site/MagicMirror-User-Guide-147aea89ebf680c189cdd76f5668261a)
2. [Installation Guide](https://thread-sphynx-f26.notion.site/MagicMirror-User-Guide-147aea89ebf680c189cdd76f5668261a)

If you have any questions or need assistance, please [submit an issue](https://github.com/idootop/MagicMirror/issues) or join our [Discord server](https://discord.gg/87RuMC5smy).

Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
MagicMirror 目前支持 macOS 和 Windows 系统:

1. [下载安装包](https://github.com/idootop/MagicMirror/releases/tag/app-v1.0.0)
2. [使用教程](https://ccnpyvkdfkte.feishu.cn/wiki/LAn6w4NqwiqeKmkXBrLc4MEBnDh)
2. [安装/使用教程](https://ccnpyvkdfkte.feishu.cn/wiki/LAn6w4NqwiqeKmkXBrLc4MEBnDh)

如果你还有其他问题,请提交 [Issue](https://github.com/idootop/MagicMirror/issues) 或加入 [QQ 交流群](https://pd.qq.com/s/btxvzr9de)

Expand Down

0 comments on commit 6c9dcea

Please sign in to comment.