-
Notifications
You must be signed in to change notification settings - Fork 182
51 lines (44 loc) · 1.47 KB
/
Copy pathbuild.yml
File metadata and controls
51 lines (44 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: buildnrelease
on:
push:
branches: [ main ]
pull_request:
jobs:
build-and-release:
runs-on: macos-latest
env:
GH_TOKEN: ${{ secrets.GH_PAT }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode.app
- name: show xcode version
run: xcodebuild -version
- name: build
run: |
xcodebuild \
-project lara.xcodeproj \
-scheme lara \
-configuration Debug \
-sdk iphoneos \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGN_IDENTITY="" \
build
- name: handle archival
id: handle_release
run: |
LATEST=$(gh release list --limit 1 --json tagName,createdAt | jq -r '.[0].tagName')
if [ "$LATEST" != "null" ]; then
SHA=$(gh release view "$LATEST" --json targetCommitish -q '.targetCommitish')
gh release create "${LATEST}-old" --target "$SHA" --notes "Old release tag"
gh release delete "$LATEST" --yes
- name: new release
run: |
COMMITS=$(git log --since="12 hours ago" --pretty=format:"- %s (%an)")
TAG="latest ($(date +%Y%m%d%H%M%S))"
gh release create "$TAG" tree/main/build/Debug-iphonesimulator/lara.ipa \
--title "$TAG" \
--notes "$COMMITS" \
--prerelease