-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add xcode build and analysis (#4)
* ci: add xcode build and analysis * ci: use mxcl/xcodebuild action * ci: specify xcode build action * build: use development signing capabilities * ci: remove code sign identity * ci: test apple dev team auto sign * build: no build dev team * build: remove code signer setting * build: automatic apple dev signing * ci: use code sign identity * ci: use pod workspace setting * ci: specify scheme for Xcode build * ci: manually run pod install and xcode build * ci: publish build assets to branch * ci: copy build asset for publishing * ci: écho debug output * ci: fix setting publish dir env variable * ci: zip generator before publishing * ci: wip * ci: document command for bundling distributable create artifact from same folder path
- Loading branch information
Showing
4 changed files
with
83 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: xcode - build | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: latest macos x | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install | ||
uses: mxcl/xcodebuild@v2 | ||
with: | ||
xcode: ^14 | ||
action: none | ||
- name: Build | ||
run: | | ||
pod install | ||
xcodebuild -configuration Debug -workspace QuickLookXD.xcworkspace -scheme QuickLookXD clean build -quiet | ||
# Create variables to use in packaging | ||
export BUNDLE_FILEPATH="$(xcodebuild -configuration Debug -workspace QuickLookXD.xcworkspace -scheme QuickLookXD -showBuildSettings 2>&1 | grep CODESIGNING_FOLDER_PATH | cut -d '=' -f2 | tr -d '[:space:]')" | ||
export BUNDLE_PATH=$(dirname "${BUNDLE_FILEPATH}") | ||
export BUNDLE_FILE=$(basename "${BUNDLE_FILEPATH}") | ||
export PUBLISH_DIR="/tmp/quicklookxdist" | ||
export PUBLISH_ZIP="bundle.zip" | ||
# Enter the built generator bundle directory | ||
echo "[${BUNDLE_PATH}]:" | ||
cd "${BUNDLE_PATH}" && ls | ||
# Archive the built generator as a zip file | ||
echo "BUNDLE: ${BUNDLE_FILE} >>> ${PUBLISH_ZIP}" | ||
zip -9qr "${PUBLISH_ZIP}" "${BUNDLE_FILE}" | ||
echo "[$(pwd)]:" && ls "${PUBLISH_ZIP}" | ||
# Ensure the directory to publish exists | ||
echo "CREATE: ${PUBLISH_DIR}" | ||
mkdir -p "${PUBLISH_DIR}" | ||
# Move the bundle zip to the publish path | ||
echo "MOVING: ${PUBLISH_ZIP} >>> ${PUBLISH_DIR}" | ||
cp "${PUBLISH_ZIP}" "${PUBLISH_DIR}" | ||
echo "[${PUBLISH_DIR}]:" && ls "${PUBLISH_DIR}" | ||
# Make the packaging variables available | ||
echo "BUNDLE_PATH=${BUNDLE_PATH}" >> "$GITHUB_ENV" | ||
echo "BUNDLE_FILE=${BUNDLE_FILE}" >> "$GITHUB_ENV" | ||
echo "PUBLISH_ZIP=${PUBLISH_ZIP}" >> "$GITHUB_ENV" | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: | | ||
${{ env.BUNDLE_PATH }}/${{ env.BUNDLE_FILE }} | ||
${{ env.BUNDLE_PATH }}/${{ env.PUBLISH_ZIP }} | ||
retention-days: 13 | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: github.ref == 'refs/heads/main' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' | ||
with: | ||
github_token: ${{ secrets.GH_TOKEN }} | ||
publish_dir: ${{ env.PUBLISH_DIR }} | ||
publish_branch: dist | ||
destination_dir: ${{ github.sha }} | ||
keep_files: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters