Skip to content

Commit

Permalink
更新 action
Browse files Browse the repository at this point in the history
  • Loading branch information
ming1016 committed Sep 18, 2024
1 parent 2d17b40 commit 6328a45
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 5 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build Package
on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Checkout
uses: actions/checkout@master
- uses: actions/checkout@v2
- name: submodules-init
uses: snickerbockers/submodules-init@v4
- name: Import PAT from Actions secrets
run: |
cd SwiftPamphletApp/App
sed -i '' s/'gitHubAccessToken = ""'/'gitHubAccessToken = "${{ secrets.PAT }}"'/ SwiftPamphletAppConfig.swift
cd ..
- name: Build
run: |
if grep -q 'gitHubAccessToken = ""' ./SwiftPamphletApp/App/SwiftPamphletAppConfig.swift ; then
echo "please setup your personal access token to Actions secrets and name it to PAT" && exit
fi
chmod +x ./compile.command
/bin/bash -c ./compile.command
zip -r9 戴铭的开发小册子.zip 戴铭的开发小册子.app
- name: Upload App.zip
uses: actions/upload-artifact@v2.2.4
with:
name: "戴铭的开发小册子.zip"
path: "戴铭的开发小册子.zip"
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ Swift开发的手册,是个 macOS 程序,已上线macOS应用商店,[点
内容主要包含

- Apple 技术知识点以及示例
- 历年 WWDC

功能主要包含

- 手册书签收藏
- 资料收集整理(参考[我是怎么做个人知识管理(PKM)的,从史前时代备忘录、Sublime,经历了Evernote,Markdown兴起,Bear的优雅,Notion革命,飞书语雀,Obsidian、Flomo,到最后使用卢曼卡片盒笔记法串起了流程](https://mp.weixin.qq.com/s/PbUOxURK57eIeSnuE1mh4g)这篇文章,里面有提及如何使用小册子的资料整理功能)
- 离线保存资料
- 知识点和资料关联
- 手册、WWDC和资料可搜索
- 手册内容和资料可搜索
- Github 开发者和仓库信息添加管理

本应用知识点目前主要有 Swift 基础语法,SwiftUI,SwiftData,小组件等知识内容。
Expand Down
8 changes: 8 additions & 0 deletions SwiftPamphletApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@
087AAA972C9AAEA100877650 /* 自动化构建流程(ap).md in Resources */ = {isa = PBXBuildFile; fileRef = 087AAA962C9AAEA100877650 /* 自动化构建流程(ap).md */; };
087AAA992C9AB23C00877650 /* Xcode(ap).md in Resources */ = {isa = PBXBuildFile; fileRef = 087AAA982C9AB23C00877650 /* Xcode(ap).md */; };
087AAA9B2C9AB32800877650 /* CocoaPods(ap).md in Resources */ = {isa = PBXBuildFile; fileRef = 087AAA9A2C9AB32800877650 /* CocoaPods(ap).md */; };
087AAA9D2C9ABEFB00877650 /* 人工智能-文本(ap).md in Resources */ = {isa = PBXBuildFile; fileRef = 087AAA9C2C9ABEFB00877650 /* 人工智能-文本(ap).md */; };
087AAA9F2C9AC1E200877650 /* 使用LLM模型(ap).md in Resources */ = {isa = PBXBuildFile; fileRef = 087AAA9E2C9AC1E200877650 /* 使用LLM模型(ap).md */; };
0887A59A2BA28F6D00131359 /* CSGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0887A5992BA28F6D00131359 /* CSGuideView.swift */; };
0888EF752C1C280F004967AD /* AVKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0869233F2BF2BF81006779A3 /* AVKit.framework */; };
088F2C222C87F9A700DCA64F /* IO性能-文件读写(ap).md in Resources */ = {isa = PBXBuildFile; fileRef = 088F2C212C87F9A700DCA64F /* IO性能-文件读写(ap).md */; };
Expand Down Expand Up @@ -671,6 +673,8 @@
087AAA962C9AAEA100877650 /* 自动化构建流程(ap).md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = "自动化构建流程(ap).md"; sourceTree = "<group>"; };
087AAA982C9AB23C00877650 /* Xcode(ap).md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = "Xcode(ap).md"; sourceTree = "<group>"; };
087AAA9A2C9AB32800877650 /* CocoaPods(ap).md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = "CocoaPods(ap).md"; sourceTree = "<group>"; };
087AAA9C2C9ABEFB00877650 /* 人工智能-文本(ap).md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = "人工智能-文本(ap).md"; sourceTree = "<group>"; };
087AAA9E2C9AC1E200877650 /* 使用LLM模型(ap).md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = "使用LLM模型(ap).md"; sourceTree = "<group>"; };
0887A5992BA28F6D00131359 /* CSGuideView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CSGuideView.swift; sourceTree = "<group>"; };
088F2C212C87F9A700DCA64F /* IO性能-文件读写(ap).md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = "IO性能-文件读写(ap).md"; sourceTree = "<group>"; };
088F2C232C87FDFE00DCA64F /* IO性能-文件缓存(ap).md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = "IO性能-文件缓存(ap).md"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1018,9 +1022,11 @@
083266912C97E51400E27CC5 /* 人工智能-介绍(ap).md */,
083266932C97E52700E27CC5 /* Core ML(ap).md */,
083266952C97E5FF00E27CC5 /* Create ML(ap).md */,
087AAA9C2C9ABEFB00877650 /* 人工智能-文本(ap).md */,
083266972C97E62F00E27CC5 /* 人工智能-语音(ap).md */,
083266992C97E64700E27CC5 /* 人工智能-视觉(ap).md */,
0832669B2C97E65A00E27CC5 /* 人工智能-Metal(ap).md */,
087AAA9E2C9AC1E200877650 /* 使用LLM模型(ap).md */,
0832669D2C97E67A00E27CC5 /* Stable Diffusion(ap).md */,
083266A12C987A0700E27CC5 /* AI辅助开发APP(ap).md */,
);
Expand Down Expand Up @@ -2520,6 +2526,7 @@
08448F97279EB9B000B61353 /* 打印(ap).md in Resources */,
08448FC5279EC4F800B61353 /* sorted(ap).md in Resources */,
087AAA882C9A768200877650 /* 组件化模块化(ap).md in Resources */,
087AAA9D2C9ABEFB00877650 /* 人工智能-文本(ap).md in Resources */,
08F0F8BB2C95976E00DC659B /* 开源-阅读(ap).md in Resources */,
083266942C97E52700E27CC5 /* Core ML(ap).md in Resources */,
088F2C4C2C932C5800DCA64F /* 知识管理-PKM(ap).md in Resources */,
Expand Down Expand Up @@ -2562,6 +2569,7 @@
0851E56D2C8711DA00D9463A /* OC运行时(ap).md in Resources */,
086E03632C6E70EB008CEDD3 /* TimeInterval(ap).md in Resources */,
0851E5692C870C4E00D9463A /* InApp分析工具(ap).md in Resources */,
087AAA9F2C9AC1E200877650 /* 使用LLM模型(ap).md in Resources */,
0832669A2C97E64700E27CC5 /* 人工智能-视觉(ap).md in Resources */,
08BDD5372C6B007A00914412 /* AttributeString(ap).md in Resources */,
08BDD5032C6B007A00914412 /* PhaseAnimator(ap).md in Resources */,
Expand Down
2 changes: 2 additions & 0 deletions SwiftPamphletApp/Guide/View/GuideListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -674,9 +674,11 @@ final class GuideListModel {
L(t: "人工智能-介绍"),
L(t: "Core ML"),
L(t: "Create ML"),
L(t: "人工智能-文本"),
L(t: "人工智能-语音"),
L(t: "人工智能-视觉"),
L(t: "人工智能-Metal"),
L(t: "使用LLM模型"),
L(t: "Stable Diffusion"),
L(t: "AI辅助开发APP"),
]),
Expand Down
4 changes: 2 additions & 2 deletions SwiftPamphletApp/Setting/SettingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct SettingView: View {
}
customSearch()
.tabItem {
Label("自定义搜索", systemImage: "mail.and.text.magnifyingglass")
Label("自定义标签", systemImage: "mail.and.text.magnifyingglass")
}

}
Expand All @@ -29,7 +29,7 @@ struct SettingView: View {
@ViewBuilder
func customSearch() -> some View {
VStack {
Text("输入自定义的搜索关键字,以换行作为间隔")
Text("输入自定义的标签,以换行作为间隔")
TextEditor(text: $term)
.overlay {
Rectangle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public struct SMFile {
public static func loadBundleData(_ filename: String) -> Data {
let data: Data
guard let file = Bundle.main.url(forResource: filename, withExtension: nil) else {
let str = "<p>此部分为 App Store 版本内容,请到<a href=\"https://apps.apple.com/cn/app/%E6%88%B4%E9%93%AD%E7%9A%84%E5%BC%80%E5%8F%91%E5%B0%8F%E5%86%8C%E5%AD%90/id1609702529?mt=12\">应用商店下载(98元)</a></p>"
let str = "<p>此部分为 App Store 版本内容,请到<a href=\"https://apps.apple.com/cn/app/%E6%88%B4%E9%93%AD%E7%9A%84%E5%BC%80%E5%8F%91%E5%B0%8F%E5%86%8C%E5%AD%90/id1609702529?mt=12\">应用商店下载</a></p>"
if let data = str.data(using: .utf8) {
return data
} else {
Expand Down

0 comments on commit 6328a45

Please sign in to comment.