Skip to content

merge: 2.9 Week Release #14

merge: 2.9 Week Release

merge: 2.9 Week Release #14

Workflow file for this run

# Author by chanhihi
# Date 2023.08.09
name: Deployment
on:
pull_request:
branches:
- cluster-main
- main
types:
- closed
jobs:
build:
name: Deploy on macOS 11 - Archive / Release
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_ARCHIVE_EXPORT_PATH: "./archive"
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: 5.3
- name: Archive
run: |
mv Box42/Resources/ExportOptions.plist . &&
xcodebuild archive -project $XCODE_PROJECT -scheme $XCODE_SCHEME -archivePath "$XCODE_ARCHIVE_EXPORT_PATH"/"$XCODE_ARCHIVE_PATH"
# - name: Distribute
# run: |
# mkdir -p artifacts &&
# xcodebuild -exportArchive -archivePath "$XCODE_ARCHIVE_PATH" -exportOptionsPlist ExportOptions.plist -exportPath "$XCODE_EXPORT_PATH"
- name: Tagging
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.CHANHIHI }}
- name: Draft Release
id: draft_release
uses: release-drafter/release-drafter@v5
with:
config-name: Release-note.yml
env:
GITHUB_TOKEN: ${{ secrets.CHANHIHI }}
# Artifact가 Archive 기능으로 사용할 부분
- name: Upload Box42-Archive
uses: actions/upload-artifact@v2
with:
name: Box42-${{ steps.tag_version.outputs.new_tag }}
path: ${{ env.XCODE_ARCHIVE_EXPORT_PATH }}
# Distribute 기능 활성화시 Artifact에서 사용할 부분
# - name: Upload Box42-Artifacts
# uses: actions/upload-artifact@v2
# with:
# name: Box42-${{ steps.tag_version.outputs.new_tag }}
# path: $XCODE_EXPORT_PATH