Skip to content

Commit 581ed34

Browse files
committed
linuxオンリーで修正
1 parent fe2f3bd commit 581ed34

1 file changed

Lines changed: 15 additions & 29 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# GitHub Actions: Release Build and Upload
22

3-
# オプショナルですが、ワークフロー名を定義すると分かりやすくなります
43
name: Release Build and Upload
54

65
on:
@@ -9,27 +8,10 @@ on:
98

109
jobs:
1110
publish:
12-
name: Build and Release (${{ matrix.target }})
11+
name: Build and Release (linux)
1312
permissions:
1413
contents: write # Release への書き込み権限
15-
strategy:
16-
fail-fast: false
17-
matrix:
18-
include:
19-
# Windows x86_64 (MSVC)
20-
- target: x86_64-pc-windows-msvc
21-
os: windows-latest
22-
# Linux x86_64 (GNU)
23-
- target: x86_64-unknown-linux-gnu
24-
os: ubuntu-latest
25-
# macOS x86_64 (Intel)
26-
- target: x86_64-apple-darwin
27-
os: macos-latest
28-
# macOS aarch64 (Apple Silicon)
29-
- target: aarch64-apple-darwin
30-
os: macos-latest
31-
32-
runs-on: ${{ matrix.os }} # ジョブが実行されるOS
14+
runs-on: ubuntu-latest
3315

3416
steps:
3517
# 1. リポジトリをチェックアウト
@@ -56,25 +38,29 @@ jobs:
5638
uses: dtolnay/rust-toolchain@stable
5739
with:
5840
toolchain: stable
59-
targets: ${{ matrix.target }}
41+
targets: x86_64-unknown-linux-gnu
6042

6143
- name: Build common library
6244
run: |
63-
cargo build --release --target ${{ matrix.target }} -p common
45+
cargo build --release --target x86_64-unknown-linux-gnu -p common
6446
6547
- name: Build & Release Tauri App
66-
id: tauri # このステップの出力を後で参照するためのID
48+
id: tauri
6749
uses: tauri-apps/tauri-action@v0.5.20
6850
env:
69-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Release作成やアップロードに必要なトークン
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7052
with:
71-
projectPath: client-tauri # Tauriプロジェクトのパス
72-
args: --target ${{ matrix.target }} --release # tauri build に渡す引数
53+
projectPath: client-tauri
54+
args: --target x86_64-unknown-linux-gnu --release
7355

7456
- name: Upload common artifact
7557
uses: actions/upload-release-asset@v1
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7660
with:
77-
upload_url: ${{ steps.tauri.outputs.upload_url }}
78-
asset_path: target/${{ matrix.target }}/release/libcommon.rlib
79-
asset_name: libcommon-${{ matrix.target }}.rlib
61+
# tauri-action の出力変数名は releaseUploadUrl
62+
upload_url: ${{ steps.tauri.outputs.releaseUploadUrl }}
63+
# Linux x86_64 ターゲットに合わせてハードコード
64+
asset_path: target/x86_64-unknown-linux-gnu/release/libcommon.rlib
65+
asset_name: libcommon-x86_64-unknown-linux-gnu.rlib
8066
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)