Update README.md #50
Workflow file for this run
This file contains hidden or 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
| name: Build1 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "*.*.*" | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Import certificates and provisioning profile | |
| env: | |
| APPLE_WWDR_CERT: ${{ secrets.APPLE_WWDR_CERT }} | |
| DEVELOPER_ID_APPLICATION_CERT: ${{ secrets.DEVELOPER_ID_APPLICATION_CERT }} | |
| DEVELOPER_ID_APPLICATION_PASSWORD: ${{ secrets.DEVELOPER_ID_APPLICATION_PASSWORD }} | |
| PROVISIONING_PROFILE: ${{ secrets.PROVISIONING_PROFILE }} | |
| run: | | |
| # Create keychain | |
| security create-keychain -p "" build.keychain | |
| security default-keychain -s build.keychain | |
| security unlock-keychain -p "" build.keychain | |
| echo -n "$APPLE_WWDR_CERT" | base64 --decode > apple_wwdr.cer | |
| security import apple_wwdr.cer -k build.keychain -T /usr/bin/codesign | |
| echo -n "$DEVELOPER_ID_APPLICATION_CERT" | base64 --decode > certificate.p12 | |
| security import certificate.p12 -k build.keychain -P "$DEVELOPER_ID_APPLICATION_PASSWORD" -A -t cert -f pkcs12 | |
| mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | |
| echo "$PROVISIONING_PROFILE" | base64 --decode > ~/Library/MobileDevice/Provisioning\ Profiles/Pricey_Developer_ID_Application.provisionprofile | |
| # security dump-keychain build.keychain | |
| # security list-keychain -d user -s build.keychain | |
| security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain | |
| # List identities to verify import | |
| security find-identity -v -p codesigning | |
| security default-keychain -s build.keychain | |
| - name: Archive app | |
| env: | |
| DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }} | |
| CODE_SIGN_IDENTITY: ${{ secrets.CODE_SIGN_IDENTITY }} | |
| run: | | |
| xcodebuild \ | |
| DEVELOPMENT_TEAM="$DEVELOPMENT_TEAM" \ | |
| CODE_SIGN_IDENTITY="$CODE_SIGN_IDENTITY" \ | |
| -scheme Pricey \ | |
| -archivePath archive_path.xcarchive \ | |
| archive | |
| - name: Export archive | |
| env: | |
| DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }} | |
| CODE_SIGN_IDENTITY: ${{ secrets.CODE_SIGN_IDENTITY }} | |
| EXPORT_OPTIONS_PLIST: ${{ vars.EXPORT_OPTIONS_PLIST }} | |
| run: | | |
| echo $EXPORT_OPTIONS_PLIST > export_options.plist | |
| ls -l export_options.plist | |
| xcodebuild \ | |
| DEVELOPMENT_TEAM="$DEVELOPMENT_TEAM" \ | |
| CODE_SIGN_IDENTITY="$CODE_SIGN_IDENTITY" \ | |
| -exportArchive \ | |
| -archivePath archive_path.xcarchive \ | |
| -exportOptionsPlist export_options.plist \ | |
| -exportPath export_path | |
| - name: Create app bundle | |
| run: | | |
| cd export_path | |
| ditto -c -k --keepParent Pricey.app ../Pricey-darwin-arm64.zip | |
| - name: Submit to Notary | |
| env: | |
| NOTARY_KEY: ${{ secrets.NOTARY_KEY }} | |
| NOTARY_KEY_ID: ${{ secrets.NOTARY_KEY_ID }} | |
| NOTARY_ISSUER: ${{ secrets.NOTARY_ISSUER }} | |
| run: | | |
| echo $NOTARY_KEY | base64 --decode > AuthKey.p8 | |
| ls -l AuthKey.p8 | |
| xcrun notarytool submit Pricey-darwin-arm64.zip --key AuthKey.p8 --key-id $NOTARY_KEY_ID --issuer $NOTARY_ISSUER --wait | |
| rm -f AuthKey.p8 | |
| - name: Make dmg distribution | |
| run: | | |
| cd dmg | |
| unzip ../Pricey-darwin-arm64.zip | |
| ln -sf /Applications Applications | |
| cd .. | |
| hdiutil create -volname "PriceyApp" -srcfolder dmg -ov -format UDZO Pricey-darwin-arm64.dmg | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Pricey-darwin-arm64 | |
| path: | | |
| Pricey-darwin-arm64.zip | |
| Pricey-darwin-arm64.dmg | |
| - name: Upload release | |
| if: github.ref_type == 'tag' | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.RELEASES_TOKEN }} | |
| with: | |
| name: Version ${{ github.ref_name }} | |
| files: | | |
| Pricey-darwin-arm64.zip | |
| Pricey-darwin-arm64.dmg | |