65 lines
1.6 KiB
YAML
65 lines
1.6 KiB
YAML
name: ClashX
|
|
|
|
on:
|
|
push:
|
|
tags: [ v* ]
|
|
workflow_dispatch:
|
|
inputs:
|
|
logLevel:
|
|
|
|
env:
|
|
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: macos-12
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: test
|
|
run: git rev-list --count origin/master..origin/meta
|
|
|
|
- name: setup Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.19.x
|
|
|
|
- name: download meta core
|
|
uses: dsaltares/fetch-gh-release-asset@master
|
|
with:
|
|
repo: 'MetaCubeX/Clash.Meta'
|
|
regex: true
|
|
file: "darwin.*\\.gz"
|
|
target: 'clash.meta/'
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: install deps
|
|
run: bash install_dependency.sh
|
|
|
|
- name: build infos
|
|
run: python3 ClashX/add_build_info.py
|
|
|
|
- name: build
|
|
run: xcodebuild archive -workspace ClashX.xcworkspace -scheme ClashX -archivePath archive/ClashX.xcarchive -showBuildTimingSummary -allowProvisioningUpdates
|
|
|
|
- name: create zip
|
|
run: ditto -c -k --sequesterRsrc --keepParent archive/ClashX.xcarchive/Products/Applications/ClashX\ Meta.app ClashX\ Meta.zip
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v3
|
|
if: "!startsWith(github.ref, 'refs/tags/')"
|
|
with:
|
|
name: "ClashX Meta.zip"
|
|
path: "ClashX Meta.zip"
|
|
|
|
- name: upload build to github
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
generate_release_notes: true
|
|
files: "ClashX Meta.zip"
|