Skip to content

feat: 온보딩 약관 동의 화면 추가 (#110) #9

feat: 온보딩 약관 동의 화면 추가 (#110)

feat: 온보딩 약관 동의 화면 추가 (#110) #9

Workflow file for this run

name: Build Moa App
on:
push:
tags: ['v*']
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g., v1.0.0)'
required: true
type: string
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
notify-start:
runs-on: ubuntu-latest
steps:
- name: Discord Build Start Notification
continue-on-error: true
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL }}
VERSION: ${{ github.ref_name || inputs.version }}
ACTOR: ${{ github.actor }}
run: |
TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)
PAYLOAD=$(jq -n \
--arg version "$VERSION" \
--arg actor "$ACTOR" \
--arg timestamp "$TIMESTAMP" \
'{
embeds: [{
title: ("🚀 Moa App " + $version + " 빌드 시작"),
color: 3447003,
fields: [
{name: "버전", value: $version, inline: true},
{name: "배포자", value: $actor, inline: true},
{name: "대상", value: "macOS (aarch64), macOS (x86_64), Windows"}
],
timestamp: $timestamp
}]
}')
curl -f -H "Content-Type: application/json" \
-d "$PAYLOAD" \
"$DISCORD_WEBHOOK"
publish-tauri:
needs: [notify-start]
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- platform: 'macos-latest'
args: '--target aarch64-apple-darwin'
- platform: 'macos-latest'
args: '--target x86_64-apple-darwin'
- platform: 'windows-latest'
args: '--bundles nsis,updater'
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Install frontend dependencies
run: bun install
- name: Import Apple Certificate (macOS)
if: matrix.platform == 'macos-latest'
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
echo -n "$APPLE_CERTIFICATE" | base64 --decode -o $CERTIFICATE_PATH
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security import $CERTIFICATE_PATH -P "$APPLE_CERTIFICATE_PASSWORD" \
-A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple:,codesign: \
-s -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Setup Apple API Key (macOS)
if: matrix.platform == 'macos-latest'
env:
APPLE_API_KEY_CONTENT: ${{ secrets.APPLE_API_KEY_CONTENT }}
run: |
KEY_PATH="$HOME/private_keys/AuthKey_${{ secrets.APPLE_API_KEY }}.p8"
mkdir -p "$(dirname "$KEY_PATH")"
echo -n "$APPLE_API_KEY_CONTENT" | base64 --decode -o "$KEY_PATH"
echo "APPLE_API_KEY_PATH=$KEY_PATH" >> $GITHUB_ENV
- name: Build and release
uses: tauri-apps/tauri-action@action-v0.6.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
with:
tagName: ${{ github.ref_name || inputs.version }}
releaseName: 'Moa ${{ github.ref_name || inputs.version }}'
releaseBody: |
## Moa ${{ github.ref_name || inputs.version }}
### 설치 방법
#### macOS
- **Apple Silicon**: `moa_<version>_aarch64.dmg`
- **Intel** (x86_64): `moa_<version>_x64.dmg`
`.dmg` 파일을 다운로드하여 Applications 폴더로 드래그하세요.
#### Windows
- **EXE**: `moa_<version>_x64-setup.exe`
#### 자동 업데이트
기존 사용자는 자동 업데이트 알림을 받습니다.
releaseDraft: true
prerelease: ${{ contains(github.ref_name, '-') || contains(inputs.version, '-') }}
includeUpdaterJson: true
args: ${{ matrix.args }}
notify-end:
needs: [publish-tauri]
runs-on: ubuntu-latest
if: always()
steps:
- name: Discord Notification
continue-on-error: true
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL }}
BUILD_RESULT: ${{ needs.publish-tauri.result }}
VERSION: ${{ github.ref_name || inputs.version }}
ACTOR: ${{ github.actor }}
REPO: ${{ github.repository }}
run: |
if [ "$BUILD_RESULT" == "success" ]; then
COLOR=5763719
TITLE="✅ Moa App $VERSION 빌드 성공"
else
COLOR=15548997
TITLE="❌ Moa App $VERSION 빌드 실패"
fi
RELEASE_URL="https://github.com/${REPO}/releases"
TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)
PAYLOAD=$(jq -n \
--arg title "$TITLE" \
--argjson color "$COLOR" \
--arg version "$VERSION" \
--arg actor "$ACTOR" \
--arg release_url "$RELEASE_URL" \
--arg timestamp "$TIMESTAMP" \
'{
embeds: [{
title: $title,
color: $color,
fields: [
{name: "버전", value: $version, inline: true},
{name: "배포자", value: $actor, inline: true},
{name: "릴리스", value: $release_url}
],
timestamp: $timestamp
}]
}')
curl -f -H "Content-Type: application/json" \
-d "$PAYLOAD" \
"$DISCORD_WEBHOOK"