Code: Select all
- name: Build iOS
run: dotnet publish ${{ inputs.project-file }} -c ${{ inputs.build-config }} -f ${{ inputs.dotnet-version-target}}-ios /p:ArchiveOnBuild=true --no-restore
/Users/runner/.dotnet/packs/Microsoft.iOS.Sdk.net8.0_18.0/18.0.8319/tools/msbuild/iOS/Xamarin.Shared.targets(1835,3): error : No valid iOS code signing keys found in keychain. You need to request a codesigning certificate from https://developer.apple.com. [/Users/runner/work/App/App/App/App.csproj::TargetFramework=net8.0-ios]
/Users/runner/.dotnet/packs/Microsoft.iOS.Sdk.net8.0_18.0/18.0.8319/tools/msbuild/iOS/Xamarin.Shared.targets(1835,3): error : [/Users/runner/work/App/App/App/App.csproj::TargetFramework=net8.0-ios]
< /code>
Dies ist mein CD-ios.yml-Workflow (ohne alle Eingaben von meinem CD-build.yml): < /p>
name: iOS Publish
jobs:
publish-ios:
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
name: Set XCode version
with:
xcode-version: ${{ inputs.xcode-version }}
- name: Import iOS Certs
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ secrets.dist-cert-p12 }}
p12-password: ${{ secrets.dist-cert-password }}
- name: Download Provisioning Profiles
id: provisioning
uses: apple-actions/download-provisioning-profiles@v1
with:
bundle-id: ${{ inputs.package-name }}
profile-type: 'IOS_APP_STORE'
issuer-id: ${{ secrets.appstore-issuer }}
api-key-id: ${{ secrets.appstore-keyid }}
api-private-key: ${{ secrets.appstore-private-key }}
- name: List Certificates
run: security find-identity -v -p codesigning
- name: List Downloaded Provisioning Profiles
run: ls -lah ~/Library/MobileDevice/Provisioning\ Profiles/
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup .NET ${{ inputs.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ inputs.dotnet-version }}
- name: Install MAUI Workloads
run: dotnet workload install maui
- name: Restore NuGet Packages
run: dotnet restore ${{ inputs.sln-file }} --configfile ${{ inputs.nuget-config }}
env:
TELERIK_NUGET_KEY: ${{ secrets.telerik-nuget-api-key }}
- name: Version the app
uses: managedcode/MAUIAppVersion@v1
with:
csproj: ${{ inputs.project-file }}
version: ${{ github.run_number }}
displayVersion: ${{ inputs.build-version }}.${{ github.run_number }}
printFile: true
- name: Build iOS
run: dotnet publish ${{ inputs.project-file }} -c ${{ inputs.build-config }} -f ${{ inputs.dotnet-version-target}}-ios /p:ArchiveOnBuild=true --no-restore
- name: Upload app to TestFlight
uses: apple-actions/upload-testflight-build@v1
with:
app-path: ${{ github.workspace }}/${{ inputs.project-folder }}/bin/${{ inputs.build-config }}/${{ inputs.dotnet-version-target}}-ios/ios-arm64/publish/*.ipa
issuer-id: ${{ secrets.appstore-issuer }}
api-key-id: ${{ secrets.appstore-keyid }}
api-private-key: ${{ secrets.appstore-private-key }}
< /code>
Der Schritt -Download meiner Bereitstellungsprofile gibt dies zurück: < /p>
Run apple-actions/download-provisioning-profiles@v1
Wrote IOS_APP_STORE profile 'iOS Team Store Provisioning Profile: com.myteam.myapp' to '/Users/runner/Library/MobileDevice/Provisioning Profiles/.mobileprovision'.
Wrote IOS_APP_STORE profile 'GithubActionsMobileApp' to '/Users/runner/Library/MobileDevice/Provisioning Profiles/.mobileprovision'.
< /code>
Das zweite Profil ist das richtige Profil, das ich verwenden möchte.Run security find-identity -v -p codesigning
1) "Apple Distribution: My Team Name (TeamID)"
1 valid identities found
< /code>
Das ist das richtige Signierzertifikat, aber ich erhalte immer noch den Fehler. doces.
Ich habe versucht, das Profiling -Profil zu extrahieren und es direkt an den Veröffentlichungsbefehl mit -p: codessignProvision = $ profile_uuid