@@ -17,11 +17,11 @@ export async function run(): Promise<void> {
1717 try {
1818 // 1. get params from workflow
1919 const env = process . env
20- core . info ( `env: ${ JSON . stringify ( env , undefined , 2 ) } ` )
20+ // core.info(`env: ${JSON.stringify(env, undefined, 2)}`)
2121 const respository = env [ 'GITHUB_REPOSITORY' ] as string
2222 const owner = env [ 'GITHUB_REPOSITORY_OWNER' ] as string
2323 const payload = github . context . payload
24- core . info ( `payload: ${ JSON . stringify ( payload , undefined , 2 ) } ` )
24+ // core.info(`payload: ${JSON.stringify(payload, undefined, 2)}`)
2525 const cdnhost = core . getInput ( 'cdnhost' )
2626 const cdnpath = core . getInput ( 'cdnpath' )
2727 const refname = ( core . getInput ( 'refname' ) || env [ 'GITHUB_REF_NAME' ] ) as string
@@ -59,7 +59,7 @@ export async function run(): Promise<void> {
5959 bundlePath : androidBundlePath ,
6060 qrPath : androidQrPath ,
6161 assetsDest : androidAssetsDest ,
62- publicPath : `${ publicPathPerfix } ${ androidAssetsDest } `
62+ publicPath : `${ publicPathPerfix } ${ iosAssetsDest } ` // use ios assets directly
6363 } )
6464
6565 // 4. run build bundle
@@ -68,7 +68,10 @@ export async function run(): Promise<void> {
6868 const { platform, bundlePath, qrPath, assetsDest, publicPath} = bundle
6969 const sourcemapparms = getSourceMapParams ( platform )
7070 await exec . exec ( `yarn build:rn --reset-cache --platform ${ platform } --bundle-output ${ bundlePath } --assets-dest ${ assetsDest } --publicPath ${ publicPath } ${ sourcemapparms } ` )
71- await exec . exec ( `cp -rf ${ assetsDest } ${ publicPath } / ${ assetsDest } ` )
71+ if ( platform === 'ios' ) {
72+ await exec . exec ( 'cp' , [ '-rfv' , `${ assetsDest } ${ publicPath } ` , `${ assetsDest } /..` ] )
73+ await exec . exec ( 'rm' , [ '-rf' , `${ assetsDest } ${ publicPath } ` ] )
74+ }
7275 const bundleUrl = `${ prefix } ${ bundlePath } `
7376 core . info ( `bundle url: ${ bundleUrl } ` )
7477 const qrText = `taro://releases?platform=${ platform } &url=${ encodeURIComponent ( bundleUrl ) } &name=${ encodeURIComponent ( appName ) } &logo=${ encodeURIComponent ( logo ) } `
0 commit comments