diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml deleted file mode 100644 index 5845488..0000000 --- a/.github/workflows/build-linux.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Build-Linux - -on: - - push: - - branches: - - - "**" - - workflow_call: - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - - uses: actions/checkout@v3 - - - name: Install Node.js, NPM and Yarn - - uses: actions/setup-node@v3 - - - name: Restore dependencies - - run: yarn install - - - name: Build Typescript - - run: yarn build-tsc - - - name: Build for Ubuntu - - run: yarn build-linux - - - name: Upload Artifacts - - uses: actions/upload-artifact@v3 - - with: - - name: artifacts - path: ./dist/ diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml deleted file mode 100644 index 1434e47..0000000 --- a/.github/workflows/build-windows.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Build-Windows - -on: - - push: - - branches: - - - "**" - - workflow_call: - -jobs: - - build: - - runs-on: windows-latest - - steps: - - - uses: actions/checkout@v3 - - - name: Install Node.js, NPM and Yarn - - uses: actions/setup-node@v3 - - - name: Restore dependencies - - run: yarn install - - - name: Build Typescript - - run: yarn build-tsc - - - name: Build for Windows - - run: yarn build-win - - - name: Upload Artifacts - - uses: actions/upload-artifact@v3 - - with: - - name: artifacts - - path: ./dist/ - diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..2f198bd --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,66 @@ + + + + +name: Build CPClient + +# Controls when the action will run. +on: + # Triggers the workflow on push for production branch + push: + branches: + - "**" + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + name: Build CPClient + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + + steps: + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '16.x' + + - name: Install dependencies + run: yarn install + + - name: Build Typescript + run: yarn build-tsc + + - name: Install + if: startsWith(matrix.os, 'ubuntu') + run: yarn build-linux + + - name: Make and Publish (Ubuntu) + if: startsWith(matrix.os, 'ubuntu') + run: yarn run publish + env: + GITHUB_TOKEN: ${{ secrets.BUILD_TOKEN }} + + - name: Make and Publish (WINDOWS) + if: startsWith(matrix.os, 'windows') + run: yarn build-win + env: + GITHUB_TOKEN: ${{ secrets.BUILD_TOKEN }} + + - name: Make and Publish (MAC) + if: startsWith(matrix.os, 'macos') + run: yarn build-mac + env: + GITHUB_TOKEN: ${{ secrets.BUILD_TOKEN }} + + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: artifacts + path: ./dist/ diff --git a/src/flash-loader.ts b/src/flash-loader.ts index 9a32fb7..a1c8091 100644 --- a/src/flash-loader.ts +++ b/src/flash-loader.ts @@ -25,4 +25,4 @@ const loadFlashPlugin = (app: App) => { app.commandLine.appendSwitch('ppapi-flash-path', path.join(__dirname, pluginName)); }; -export default loadFlashPlugin; \ No newline at end of file +export default loadFlashPlugin;