Skip to content

Commit

Permalink
Configure CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Reeywhaar committed Jun 12, 2022
1 parent efa403b commit 3afba8b
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 3 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "Release"
on:
push:
tags:
- "*.*"

jobs:
release:
name: "Release"
runs-on: macos-latest
steps:
- name: "Checkout"
uses: actions/checkout@v1

- name: "Configure certificates"
run: >
echo $DISTRIBUTION_CERT_BASE_64 | base64 --decode > cert.p12 &&
security create-keychain -p $KEYCHAIN_PASS $KEYCHAIN &&
security default-keychain -s ~/Library/Keychains/$KEYCHAIN-db &&
security set-keychain-settings $KEYCHAIN &&
security list-keychains -s $KEYCHAIN &&
security list-keychains &&
security unlock-keychain -p $KEYCHAIN_PASS $KEYCHAIN &&
security import ./cert.p12 -k $KEYCHAIN -P $DISTRIBUTION_CERT_PASS -A -T /usr/bin/codesign -T /usr/bin/security &&
security set-key-partition-list -S apple-tool:,apple: -s -k $KEYCHAIN_PASS $KEYCHAIN &&
security find-identity -p codesigning -v
env:
KEYCHAIN: "def.keychain"
KEYCHAIN_PASS: "hmmmm"
DISTRIBUTION_CERT_BASE_64: ${{ secrets.DISTRIBUTION_CERT_BASE_64 }}
DISTRIBUTION_CERT_PASS: ${{ secrets.DISTRIBUTION_CERT_PASS }}

- name: "Install pods"
run: pod install

- name: "Archive"
run: xcodebuild -workspace MiddleMe.xcworkspace -scheme MiddleMe -configuration Release archive -archivePath middleme.xcarchive

- name: "Zip App"
run: pushd middleme.xcarchive/Products/Applications && zip --symlinks -r ../../../MiddleMe.zip MiddleMe.app && popd

- name: "Create Release"
uses: softprops/action-gh-release@78c309ef59fdb9557cd6574f2e0be552936ed728
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: MiddleMe.zip
8 changes: 5 additions & 3 deletions MiddleMe.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = MiddleMe/MiddleMe.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"MiddleMe/Preview Content\"";
Expand All @@ -609,6 +609,7 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.vyrtsev.mac.MiddleMe;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
};
Expand All @@ -621,8 +622,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = MiddleMe/MiddleMe.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"MiddleMe/Preview Content\"";
Expand All @@ -639,6 +640,7 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.vyrtsev.mac.MiddleMe;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
};
Expand Down

0 comments on commit 3afba8b

Please sign in to comment.