Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
chihchy committed May 30, 2024
1 parent fd7805a commit 557a1b7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 19 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ name: Xcode Dependencies
on:
schedule:
- cron: '0 0 * * 1'
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
dependencies:
runs-on: macos-13
if: ${{ contains(github.event.head_commit.message, '[update dependencies]') || github.event_name == 'schedule' }}
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -22,9 +19,10 @@ jobs:
with:
forceResolution: true
failWhenOutdated: false
xcodePath: '/Applications/Xcode_15.4.app'
- name: Create Pull Request
if: steps.resolution.outputs.dependenciesChanged == 'true'
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
branch: 'update-dependencies'
delete-branch: true
Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- main
types: [closed]
env:
DEVELOPER_DIR: /Applications/Xcode_15.0.1.app
DEVELOPER_DIR: /Applications/Xcode_15.4.app
APP_VERSION: '2.7.4'
SCHEME_NAME: 'EhPanda'
ALTSTORE_JSON_PATH: './AltStore.json'
Expand All @@ -19,7 +19,7 @@ env:

jobs:
Deploy:
runs-on: macos-13
runs-on: macos-14
if: github.event.pull_request.merged == true && github.event.pull_request.user.login == 'chihchy'
steps:
- name: Checkout
Expand All @@ -28,21 +28,31 @@ jobs:
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Install dependencies
run: brew install swiftgen
- name: Show Xcode version
run: xcodebuild -version
- name: Run tests
run: xcodebuild clean test -scheme ${{ env.SCHEME_NAME }} -sdk iphonesimulator
run: xcodebuild clean test
-skipMacroValidation
-sdk iphonesimulator
-scheme ${{ env.SCHEME_NAME }}
-destination 'platform=iOS Simulator,name=iPhone 15 Pro'
- name: Bump version
id: bump-version
uses: yanamura/ios-bump-version@v1
with:
version: ${{ env.APP_VERSION }}
- name: Xcode archive
run: xcodebuild archive -destination 'generic/platform=iOS'
-scheme ${{ env.SCHEME_NAME }} -archivePath ${{ env.ARCHIVE_PATH }} CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO CODE_SIGN_IDENTITY= CODE_SIGN_ENTITLEMENTS= GCC_OPTIMIZATION_LEVEL=s SWIFT_OPTIMIZATION_LEVEL=-O
run: xcodebuild archive
-skipMacroValidation
-scheme ${{ env.SCHEME_NAME }}
-destination 'generic/platform=iOS'
-archivePath ${{ env.ARCHIVE_PATH }}
CODE_SIGN_IDENTITY=
CODE_SIGN_ENTITLEMENTS=
CODE_SIGNING_ALLOWED=NO
CODE_SIGNING_REQUIRED=NO
GCC_OPTIMIZATION_LEVEL=s
SWIFT_OPTIMIZATION_LEVEL=-O
- name: Export .ipa file
run: |
mkdir -p ${{ env.PAYLOAD_PATH }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: Test
on: [push]
on: [push, workflow_dispatch]
env:
SCHEME_NAME: 'EhPanda'
DEVELOPER_DIR: /Applications/Xcode_15.0.1.app
DEVELOPER_DIR: /Applications/Xcode_15.4.app
jobs:
Test:
runs-on: macos-13
runs-on: macos-14
if: ${{ !contains(github.event.head_commit.message, '[skip test]') }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: brew install swiftgen
- name: Show Xcode version
run: xcodebuild -version
- name: Run tests
run: xcodebuild clean test
-scheme ${{ env.SCHEME_NAME }} -sdk iphonesimulator
-skipMacroValidation
-sdk iphonesimulator
-scheme ${{ env.SCHEME_NAME }}
-destination 'platform=iOS Simulator,name=iPhone 15 Pro'

0 comments on commit 557a1b7

Please sign in to comment.