Reputation: 4451
CI job was working fine and it was posting the build successfully but after 15th June (Tentative) it started getting failed and unable to identify the reason why. Getting below error. Can somebody please help or provide direction using that I can fix it?
Log when getting an error:
2023-06-23T10:04:28.4433590Z ** ARCHIVE SUCCEEDED **
2023-06-23T10:04:28.4435780Z
2023-06-23T10:04:28.5632280Z (node:7479) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
2023-06-23T10:04:28.5633660Z (Use `node --trace-deprecation ...` to show where the warning was created)
2023-06-23T10:04:28.5697570Z node:fs:1551
2023-06-23T10:04:28.5701290Z handleErrorFromBinding(ctx);
2023-06-23T10:04:28.5703110Z ^
2023-06-23T10:04:28.5703440Z
2023-06-23T10:04:28.5704880Z Error: ENOENT: no such file or directory, stat '/var/folders/sp/m5rks75d44j30f37y5h1j3tr0000gn/T/AppName.xcarchive'
2023-06-23T10:04:28.5705820Z at Object.statSync (node:fs:1551:3)
2023-06-23T10:04:28.5706560Z at __node_internal_ (node:internal/fs/utils:799:8)
2023-06-23T10:04:28.5707300Z at Object.rmdirSync (node:fs:1169:15)
2023-06-23T10:04:28.5708650Z at ArchiveBuildAction.<anonymous> (/Users/runner/work/ios/ios/.github/actions/xcode-build/dist/index.js:14571:28)
2023-06-23T10:04:28.5710410Z at step (/Users/runner/work/ios/ios/.github/actions/xcode-build/dist/index.js:14453:23)
2023-06-23T10:04:28.5712240Z at Object.next (/Users/runner/work/ios/ios/.github/actions/xcode-build/dist/index.js:14434:53)
2023-06-23T10:04:28.5713310Z at /Users/runner/work/ios/ios/.github/actions/xcode-build/dist/index.js:14428:71
2023-06-23T10:04:28.5714100Z at new Promise (<anonymous>)
2023-06-23T10:04:28.5715110Z at module.exports.__webpack_modules__.7919.__awaiter (/Users/runner/work/ios/ios/.github/actions/xcode-build/dist/index.js:14424:12)
2023-06-23T10:04:28.5716500Z at ArchiveBuildAction.module.exports.__webpack_modules__.7919.ArchiveBuildAction.finish (/Users/runner/work/ios/ios/.github/actions/xcode-build/dist/index.js:14560:20) {
2023-06-23T10:04:28.5717820Z errno: -2,
2023-06-23T10:04:28.5718440Z syscall: 'stat',
2023-06-23T10:04:28.5719050Z code: 'ENOENT',
2023-06-23T10:04:28.5719860Z path: '/var/folders/sp/m5rks75d44j30f37y5h1j3tr0000gn/T/AppName.xcarchive'
2023-06-23T10:04:28.5720610Z }
CI.yml: Specific Archive code
archive:
name: Archive
runs-on: macos-13
needs: prepare
strategy:
matrix: ${{ fromJson(needs.prepare.outputs.archive-matrix) }}
steps:
- name: Install SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.ORG_SSHKEY }}
- name: Checkout repository
uses: actions/checkout@v2
with:
token: ${{ secrets.ORG_GHTOKEN }}
submodules: recursive
- name: Install pods
uses: ./.github/actions/install-pods
- name: Apply changes
uses: actions/download-artifact@v2
with:
name: ${{ env.ARTIFACT_CHANGES }}
path: ./
- name: Setup code signing
id: setup-code-signing
uses: ./.github/actions/setup-code-signing
with:
verbose: true
private-key: ${{ secrets.CODE_SIGNING_PRIVATE_KEY }}
provisioning-profile: ${{ matrix.provisioning-profile }}
- name: Create archive
id: create-archive
uses: ./.github/actions/xcode-build
with:
actions: archive
workspace: ${{ env.XC_WORKSPACE }}
scheme: ${{ env.XC_SCHEME }}
sdk: iphoneos
settings: |
CODE_SIGNING_ALLOWED: false
DEVELOPMENT_TEAM: ${{ fromJSON(steps.setup-code-signing.outputs.development-team)[0] }}
PRODUCT_BUNDLE_IDENTIFIER_${{ env.XC_SCHEME }}: ${{ steps.setup-code-signing.outputs.bundle-identifier }}
- name: Update entitlements
run: |
PRODUCT_NAME=$(xcodebuild -scheme ${{ env.XC_SCHEME }} -showBuildSettings | sed -n "s/^[[:space:]]*PRODUCT_NAME = \(.*\)/\1/p")
ENTITLEMENTS=$PRODUCT_NAME.entitlements
EXECUTABLE=${{ steps.create-archive.outputs.archive-path }}/Products/Applications/$PRODUCT_NAME.app
echo '${{ steps.setup-code-signing.outputs.entitlements }}' | plutil -convert xml1 -o $ENTITLEMENTS -- -
codesign --entitlements $ENTITLEMENTS -f -s '${{ fromJSON(steps.setup-code-signing.outputs.code-sign-identities)[0] }}' $EXECUTABLE
- name: Export archive
id: export-archive
uses: ./.github/actions/xcode-build
with:
exportArchive: true
archivePath: ${{ steps.create-archive.outputs.archive-path }}
exportPath: ./
exportOptions: |
compileBitcode: false
method: ${{ matrix.export-method }}
signingStyle: manual
teamID: ${{ fromJSON(steps.setup-code-signing.outputs.development-team)[0] }}
provisioningProfiles:
${{ steps.setup-code-signing.outputs.bundle-identifier }}: ${{ matrix.provisioning-profile }}
- name: Upload product
uses: actions/upload-artifact@v2
with:
name: ${{ steps.export-archive.outputs.product-name }} (${{ matrix.export-method }})
path: ${{ steps.export-archive.outputs.product-path }}
- name: Upload symbols
run: |
for file in ./Analytics/GoogleService-Info*.plist; do
bundle_id=$(plutil -extract BUNDLE_ID xml1 -o - $file | sed -n "s/.*<string>\(.*\)<\/string>.*/\1/p")
if [[ $bundle_id == ${{ steps.setup-code-signing.outputs.bundle-identifier }} ]]; then
./Pods/FirebaseCrashlytics/upload-symbols -gsp $file -p ios ${{ steps.create-archive.outputs.archive-path }}/dSYMs
fi
done
prepare-to-publish:
name: Prepare to Publish
runs-on: macos-13
Upvotes: 0
Views: 1120
Reputation: 4451
So Finally I got to know about below link:
GitHub Actions: All Actions will run on Node16 instead of Node12 by default
Node12 has been out of support since April 2022. As a result we have started the deprecation process of Node12 for GitHub Actions. We plan to migrate all actions to run on Node16 by Summer 2023. Following on from our warning in workflows using Node12 we will start enforcing the use of Node16 rather than Node12 on the 14th of June.
To opt out of this and continue using Node12 while it is still available in the runner, you can choose to set ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true
as an 'env' in their workflow or as an environment variable on your runner machine. This will only work until we upgrade the runner removing Node12 later in the summer.
With this temporary change ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true
in CI.yml, I am successfully able to post the build.
Upvotes: 0