Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/Deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Author by chanhihi
# Date 2023.08.09

name: Deployment

on:
push:
branches:
- cluster_main
- main
tags:
- "v*"

jobs:
build:
name: Deploy on macOS 11
runs-on: macos-11
env:
XCODE_VERSION: "12.4.0"
SWIFT_VERSION: "5.3"
XCODE_PROJECT: "Box42.xcodeproj"
XCODE_SCHEME: "Box42"
XCODE_ARCHIVE_PATH: "Box42.xcarchive"
XCODE_EXPORT_PATH: "./artifacts"
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set Xcode version
run: sudo xcode-select -s '/Applications/Xcode_12.4.0.app/Contents/Developer'

- name: Set SDK version
run: echo 'SDKROOT=/Applications/Xcode_12.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk' >> $GITHUB_ENV

- name: setup-swift
uses: swift-actions/setup-swift@v1
with:
swift-version: $SWIFT_VERSION

- name: Build
run: |
mkdir Sources &&
mv Box42 Sources/Box42 &&
swift build

- name: Archive
run: |
mv Sources/Box42/Resources/ExportOptions.plist . &&
xcodebuild archive -project $XCODE_PROJECT -scheme $XCODE_SCHEME -archivePath $XCODE_ARCHIVE_PATH

- name: Distribute
run: |
mkdir -p artifacts &&
xcodebuild -exportArchive -archivePath "$XCODE_ARCHIVE_PATH" -exportOptionsPlist ExportOptions.plist -exportPath "$XCODE_EXPORT_PATH"

- name: Upload Box42-Artifacts
uses: actions/upload-artifact@v2
with:
name: Box42-${{ github.ref_name }}
path: $XCODE_EXPORT_PATH
23 changes: 13 additions & 10 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,39 @@ name: Swift Build

on:
push:
branches: [ "feat/*", "fix/*", "refactor/*", "cluster_main", "main" ]
branches:
- feat/*
- fix/*
- refactor/*

pull_request:
branches: [ "cluster_develop" ]
branches:
- cluster_develop

jobs:
build:
name: Swift 5.3 on macOS 11
runs-on: macos-11
env:
XCODE_VERSION: "12.4.0"
SWIFT_VERSION: "5.3"
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set Xcode version
run:
sudo xcode-select -s '/Applications/Xcode_12.4.0.app/Contents/Developer'
run: sudo xcode-select -s '/Applications/Xcode_12.4.0.app/Contents/Developer'

- name: Set SDK version
run:
echo 'SDKROOT=/Applications/Xcode_12.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk' >> $GITHUB_ENV
run: echo 'SDKROOT=/Applications/Xcode_12.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk' >> $GITHUB_ENV

- name: setup-swift
uses: swift-actions/setup-swift@v1
with:
swift-version: 5.3
swift-version: ${{ env.SWIFT_VERSION }}

- name: Build
run: |
mkdir Sources &&
mv Box42 Sources/Box42 &&
swift build

# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
14 changes: 14 additions & 0 deletions Box42/Resources/ExportOptions.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>destination</key>
<string>export</string>
<key>method</key>
<string>development</string>
<key>signingStyle</key>
<string>automatic</string>
<key>teamID</key>
<string>QUAC995NAA</string>
</dict>
</plist>