diff --git a/.github/workflows/build-samuelmeuli.yml b/.github/workflows/build-samuelmeuli.yml deleted file mode 100644 index 5e31fff..0000000 --- a/.github/workflows/build-samuelmeuli.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Build/release - -on: push - -jobs: - release: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - - steps: - - name: Check out Git repository - uses: actions/checkout@v1 - - - name: Install Node.js, NPM and Yarn - uses: actions/setup-node@v1 - with: - node-version: 10 - - - 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 }} - - # 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') }} diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml new file mode 100644 index 0000000..578f246 --- /dev/null +++ b/.github/workflows/package.yml @@ -0,0 +1,112 @@ +# This is a basic workflow that is manually triggered + +name: Package + +# Controls when the action will run. Workflow runs when manually triggered using the UI +# or API. +on: + workflow_dispatch: + # Inputs the workflow accepts. + inputs: + release: + # Friendly description to be shown in the UI instead of 'name' + description: 'Release' + # Default value if no value is explicitly provided + default: 'never' + # Input has to be provided for the workflow to run + required: true + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + package-mac: + # The type of runner that the job will run on + runs-on: macos-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v1 + + - name: Install Node.js, NPM and Yarn + uses: actions/setup-node@v1 + with: + node-version: 15 + - name: Install deps + run: yarn && npm install electron-packager -g + + - name: Package + run: electron-packager . --arch=x64 && electron-packager . --arch=arm64 + - name: Upload Mac x64 Build + uses: actions/upload-artifact@v2 + with: + name: nativefier-gui-darwin-x64 + path: /Users/runner/work/nativefier-gui/nativefier-gui/nativefier-gui-darwin-x64 + - name: Upload Mac arm64 Build + uses: actions/upload-artifact@v2 + with: + name: nativefier-gui-darwin-arm64 + path: /Users/runner/work/nativefier-gui/nativefier-gui/nativefier-gui-darwin-arm64 + package-windows: + # The type of runner that the job will run on + runs-on: windows-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v1 + + - name: Install Node.js, NPM and Yarn + uses: actions/setup-node@v1 + with: + node-version: 15 + - name: Install deps + run: yarn && npm install electron-packager -g + + - name: Package + run: electron-packager . --arch=x64 && electron-packager . --arch=arm64 && electron-packager . --arch=ia32 + - name: Upload Windows x64 Build + uses: actions/upload-artifact@v2 + with: + name: nativefier-gui-win32-x64 + path: D:\a\nativefier-gui\nativefier-gui\nativefier-gui-win32-x64 + - name: Upload Windows arm64 Build + uses: actions/upload-artifact@v2 + with: + name: nativefier-gui-win32-arm64 + path: D:\a\nativefier-gui\nativefier-gui\nativefier-gui-win32-arm64 + - name: Upload Windows ia32 Build + uses: actions/upload-artifact@v2 + with: + name: nativefier-gui-win32-ia32 + path: D:\a\nativefier-gui\nativefier-gui\nativefier-gui-win32-ia32 + release-linux: + # The type of runner that the job will run on + runs-on: ubuntu-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v1 + + - name: Install Node.js, NPM and Yarn + uses: actions/setup-node@v1 + with: + node-version: 15 + - name: Install deps + run: yarn && npm install electron-packager -g + - name: Package + run: electron-packager . --arch=x64 && electron-packager . --arch=arm64 && electron-packager . --arch=ia32 && electron-packager . --arch=armv7l + - name: Upload Linux x64 Build + uses: actions/upload-artifact@v2 + with: + name: nativefier-gui-linux-x64 + path: /home/runner/work/nativefier-gui/nativefier-gui/nativefier-gui-linux-x64 + - name: Upload Linux arm64 Build + uses: actions/upload-artifact@v2 + with: + name: nativefier-gui-linux-arm64 + path: /home/runner/work/nativefier-gui/nativefier-gui/nativefier-gui-linux-arm64 + - name: Upload Linux ia32 Build + uses: actions/upload-artifact@v2 + with: + name: nativefier-gui-linux-x64 + path: /home/runner/work/nativefier-gui/nativefier-gui/nativefier-gui-linux-x64 + - name: Upload Linux armv7l Build + uses: actions/upload-artifact@v2 + with: + name: nativefier-gui-linux-armv7l + path: /home/runner/work/nativefier-gui/nativefier-gui/nativefier-gui-linux-armv7l diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..69192e1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,88 @@ +# This is a basic workflow that is manually triggered + +name: Release + +# Controls when the action will run. Workflow runs when manually triggered using the UI +# or API. +on: + workflow_dispatch: + # Inputs the workflow accepts. + inputs: + release: + # Friendly description to be shown in the UI instead of 'name' + description: 'Release' + # Default value if no value is explicitly provided + default: 'never' + # Input has to be provided for the workflow to run + required: true + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + release-mac: + # The type of runner that the job will run on + runs-on: macos-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v1 + + - name: Install Node.js, NPM and Yarn + uses: actions/setup-node@v1 + with: + node-version: 15 + - name: Install deps + run: yarn + + - name: Build + run: yarn build-mac -p ${{ github.event.inputs.release }} + env: + GH_TOKEN: ${{ secrets.github_token }} + release-windows: + # The type of runner that the job will run on + runs-on: windows-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v1 + + - name: Install Node.js, NPM and Yarn + uses: actions/setup-node@v1 + with: + node-version: 15 + - name: Install deps + run: yarn + + - name: Build + run: yarn build-windows -p ${{ github.event.inputs.release }} + env: + GH_TOKEN: ${{ secrets.github_token }} + release-linux: + # The type of runner that the job will run on + runs-on: ubuntu-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v1 + + - name: Install Node.js, NPM and Yarn + uses: actions/setup-node@v1 + with: + node-version: 15 + + - name: Install Snapcraft and Multipass + run: sudo snap install snapcraft --classic && sudo snap install multipass + - name: Install deps + run: yarn + - name: Build + run: | + docker run --rm \ + --env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_') \ + -v ${PWD}:/project \ + -v ~/.cache/electron:/root/.cache/electron \ + -v ~/.cache/electron-builder:/root/.cache/electron-builder \ + electronuserland/builder \ + /bin/bash -c "yarn && yarn build-linux -p ${{ github.event.inputs.release }}" + env: + GH_TOKEN: ${{ secrets.github_token }} + +# - name: Build +# run: yarn build-linux -p ${{ github.event.inputs.release }} +# env: +# GH_TOKEN: ${{ secrets.github_token }}