diff --git a/.env.example b/.env.example index 8fb2dd9973..9da37d3f09 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1 @@ REACT_APP_MAPBOX_ACCESS_TOKEN= -APPLE_TEAM_ID= diff --git a/.eslintrc b/.eslintrc index 979f837c23..10d96d43c5 100644 --- a/.eslintrc +++ b/.eslintrc @@ -8,8 +8,7 @@ "PRODUCTION": true, "LISK_DOMAIN": true, "REACT_APP_DEFAULT_NETWORK": true, - "REACT_APP_MAPBOX_ACCESS_TOKEN": true, - "APPLE_TEAM_ID": true + "REACT_APP_MAPBOX_ACCESS_TOKEN": true }, "env": { "es2020": true, diff --git a/.github/workflows/electron-build.yml b/.github/workflows/electron-build.yml index 9dca7caa40..079a6b009b 100644 --- a/.github/workflows/electron-build.yml +++ b/.github/workflows/electron-build.yml @@ -47,17 +47,16 @@ jobs: run: | aws s3 sync s3://lisk-desktop-files/fonts ./setup/react/assets/fonts/ + - name: Update package.json + if: startsWith(matrix.os, 'macos') + run: | + jq '.build.mac.notarize.teamId = "${{ secrets.APPLE_TEAM_ID }}"' package.json > package_temp.json + mv package_temp.json package.json + - name: Install cpx if: startsWith(matrix.os, 'desktop-build') run: npm install -g cpx - - name: Prepare for app notarization - if: startsWith(matrix.os, 'macos') - # Import Apple API key for app notarization on macOS - run: | - mkdir -p ~/private_keys/ - echo "${{ secrets.api_key_new }}" > ~/private_keys/AuthKey_${{ secrets.api_key_id_new }}.p8 - - name: Build and pack windows app if: startsWith(matrix.os, 'desktop-build') # codesigning @@ -76,10 +75,8 @@ jobs: github_token: ${{ secrets.github_token }} env: # macOS for notarization API key - API_KEY: ${{ secrets.api_key_new }} - API_KEY_ID: ${{ secrets.api_key_id_new }} - API_KEY_ISSUER_ID: ${{ secrets.api_key_issuer_id }} - APPLE_TEAM_ID: ${{ secrets.apple_team_id }} + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} - name: Output Notarization Error Log if: failure() && startsWith(matrix.os, 'macos') diff --git a/package.json b/package.json index 725e7bd072..5ba25036e6 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "entitlements": "build/entitlements.plist", "entitlementsInherit": "build/entitlements.plist", "notarize": { - "teamId": "${APPLE_TEAM_ID}" + "teamId": "" }, "target": { "target": "default", diff --git a/setup/config/webpack.config.react.js b/setup/config/webpack.config.react.js index 5868bf3a12..f35210180c 100644 --- a/setup/config/webpack.config.react.js +++ b/setup/config/webpack.config.react.js @@ -106,7 +106,6 @@ const config = { LISK_DOMAIN: '"https://lisk.com"', REACT_APP_DEFAULT_NETWORK: `"${process.env.DEFAULT_NETWORK}"`, REACT_APP_MAPBOX_ACCESS_TOKEN: `"${process.env.REACT_APP_MAPBOX_ACCESS_TOKEN}"`, - APPLE_TEAM_ID: `"${process.env.APPLE_TEAM_ID}"`, }), new StyleLintPlugin({ context: `${path.resolve(__dirname, '../../src')}`, diff --git a/setup/jest.config.js b/setup/jest.config.js index 36bc1af9fb..5d7c518db3 100644 --- a/setup/jest.config.js +++ b/setup/jest.config.js @@ -347,7 +347,6 @@ module.exports = { VERSION: '', REACT_APP_DEFAULT_NETWORK: 'undefined', REACT_APP_MAPBOX_ACCESS_TOKEN: 'pk.eyJ1Ij', - APPLE_TEAM_ID: '', LISK_ENABLE_DEV_TOOL: false, LISK_DOMAIN: 'https://lisk.com', },