diff --git a/.github/workflows/push-master.yml b/.github/workflows/push-master.yml index a86cb9b6d4..f4878709df 100644 --- a/.github/workflows/push-master.yml +++ b/.github/workflows/push-master.yml @@ -5,10 +5,10 @@ on: - master jobs: - master: + release-www: strategy: matrix: - step: ['build:release:www', 'build:release:electron'] + step: ['build:release:www'] name: ${{ matrix.step }} if: "! contains(github.event.head_commit.message, '[CI Skip]') && github.repository == 'polkadot-js/apps'" runs-on: ubuntu-latest @@ -27,6 +27,29 @@ jobs: run: | yarn install --immutable | grep -v 'YN0013' yarn ${{ matrix.step }} + release-electron: + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + if: "! contains(github.event.head_commit.message, '[CI Skip]') && github.repository == 'polkadot-js/apps'" + name: ${{ matrix.step }} + + steps: + - uses: actions/checkout@v1 + with: + token: ${{ secrets.GH_PAT }} + + - name: Build/release Electron app + uses: samuelmeuli/action-electron-builder@v1 + with: + # GitHub token, automatically provided to the action + # (No need to define this secret in the repo settings) + github_token: ${{ secrets.github_token }} + build_script_name: build:release:electron + # If the commit is tagged with a version (e.g. "v1.0.0"), + # release the app after building + release: ${{ startsWith(github.ref, 'refs/tags/v') }} dummy: name: Dummy diff --git a/i18next-scanner.config.js b/i18next-scanner.config.js index 10d671dc91..62c25d27da 100644 --- a/i18next-scanner.config.js +++ b/i18next-scanner.config.js @@ -23,7 +23,12 @@ function transform (file, enc, done) { const parserHandler = (key, options) => { options.defaultValue = key; - options.ns = /packages\/(.*?)\/src/g.exec(file.path)[1].replace('page-', 'app-'); + + if (process.platform !== 'win32') { + options.ns = /packages\/(.*?)\/src/g.exec(file.path)[1].replace('page-', 'app-'); + } else { + options.ns = /packages\\(.*?)\\src/g.exec(file.path)[1].replace('page-', 'app-'); + } this.parser.set(key, options); }; diff --git a/package.json b/package.json index 7960517ce7..c15d29bbca 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "build": "yarn run build:i18n && yarn run build:code", "build:code": "NODE_ENV=production node_modules/@polkadot/dev/scripts/polkadot-dev-build-ts.js", "build:i18n": "i18next-scanner --config i18next-scanner.config.js && node ./scripts/i18nSort.js", - "build:release:electron": "echo \"Dummy\"", "build:release:ipfs": "node scripts/ipfsUpload.js", "build:release:ghpages": "yarn polkadot-ci-ghact-docs", "build:release:www": "yarn polkadot-ci-ghact-build && yarn build:release:ipfs && yarn build:release:ghpages", @@ -48,12 +47,12 @@ "build:electronRenderer": "cd packages/apps-electron && NODE_ENV=production webpack --config webpack.renderer.config.js", "build:devElectronMain": "cd packages/apps-electron && webpack --config webpack.main.config.js", "build:electronMain": "cd packages/apps-electron && NODE_ENV=production webpack --config webpack.main.config.js", - "prepackElectron": "yarn build:electron && yarn postinstall:electron", - "packElectron:test": "yarn prepackElectron && electron-builder --dir", - "packElectron:mac": "yarn prepackElectron && electron-builder build --mac", - "packElectron:win": "yarn prepackElectron && electron-builder build --win", - "packElectron:linux": "yarn prepackElectron && electron-builder build --linux", - "packElectron": "yarn prepackElectron && yarn clean:electronRelease && electron-builder build --linux --win --mac", + "build:release:electron": "yarn build && yarn build:electron && yarn postinstall:electron", + "packElectron:test": "yarn build:release:electron && electron-builder --dir", + "packElectron:mac": "yarn build:release:electron && electron-builder build --mac", + "packElectron:win": "yarn build:release:electron && electron-builder build --win", + "packElectron:linux": "yarn build:release:electron && electron-builder build --linux", + "packElectron": "yarn build:release:electron && yarn clean:electronRelease && electron-builder build --linux --win --mac", "docs": "echo \"skipping docs\"", "clean": "polkadot-dev-clean-build", "clean:electronBuild": "cd packages/apps-electron polkadot-dev-clean-build",