-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: MihomoKit CI | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up golang environment | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ^1.22 | ||
|
||
- name: Set up gomobile | ||
run: | | ||
go install golang.org/x/mobile/cmd/gomobile@latest | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
go env GOPATH | ||
ls $(go env GOPATH)/bin | ||
gomobile init | ||
- name: Build Mihomo.xcframework | ||
run: | | ||
go mod download | ||
make | ||
- name: Zip Mihomo.xcframework | ||
run: | | ||
zip -r Mihomo.xcframework.zip Mihomo.xcframework | ||
- name: Upload to Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Mihomo.xcframework | ||
path: Mihomo.xcframework.zip | ||
|