diff options
-rw-r--r-- | .github/workflows/dev_builds.yml | 50 | ||||
-rw-r--r-- | .github/workflows/release_builds.yml | 49 | ||||
-rw-r--r-- | package.json | 6 |
3 files changed, 102 insertions, 3 deletions
diff --git a/.github/workflows/dev_builds.yml b/.github/workflows/dev_builds.yml new file mode 100644 index 0000000..e1c2598 --- /dev/null +++ b/.github/workflows/dev_builds.yml @@ -0,0 +1,50 @@ +name: Development builds CI +on: + push: + pull_request: + types: [opened, reopened] + +jobs: + build-windows: + name: "Create Windows development builds" + runs-on: "windows-latest" + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Node environment + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Install dependencies + run: npm install --force + - name: Create builds + run: npm run build:windows + - name: Archive production artifacts + uses: actions/upload-artifact@v3 + with: + name: viper-windows-builds + path: | + dist/*.exe + build-linux: + name: "Create Linux development builds" + runs-on: "ubuntu-latest" + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Node environment + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Install dependencies + run: npm install --force + - name: Create builds + run: npm run build:linux + - name: Archive production artifacts + uses: actions/upload-artifact@v3 + with: + name: viper-linux-builds + path: | + dist/*.AppImage + dist/*.tar.gz + dist/*.deb + dist/*.rpm
\ No newline at end of file diff --git a/.github/workflows/release_builds.yml b/.github/workflows/release_builds.yml new file mode 100644 index 0000000..602f90b --- /dev/null +++ b/.github/workflows/release_builds.yml @@ -0,0 +1,49 @@ +name: Release CI +on: + release: + types: [ created ] +jobs: + build-windows: + name: "Create Windows release builds" + runs-on: "windows-latest" + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Node environment + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Install dependencies + run: npm install --force + - name: Create builds + run: npm run build:windows + - name: Upload production artifacts to release + uses: xresloader/upload-to-github-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + file: "dist/*.exe*;dist/latest.yml" + release_id: ${{ github.event.release.id }} + draft: false + build-linux: + name: "Create Linux release builds" + runs-on: "ubuntu-latest" + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup Node environment + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Install dependencies + run: npm install --force + - name: Create builds + run: npm run build:linux + - name: Upload production artifacts to release + uses: xresloader/upload-to-github-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + file: "dist/*.AppImage;dist/*.tar.gz;dist/*.deb;dist/*.rpm;dist/latest-linux.yml" + release_id: ${{ github.event.release.id }} + draft: false diff --git a/package.json b/package.json index 51565cd..22015c3 100644 --- a/package.json +++ b/package.json @@ -29,9 +29,9 @@ "langs": "node build/langs.js", "start": "npx electron src/index.js", "debug": "npx electron src/index.js --debug", - "build": "npx electron-builder --win nsis --win portable --linux", - "build:windows": "npx electron-builder --win nsis --win portable", - "build:linux": "npx electron-builder --linux", + "build": "npx electron-builder --win nsis --win portable --linux -p never", + "build:windows": "npx electron-builder --win nsis --win portable -p never", + "build:linux": "npx electron-builder --linux -p never", "publish": "npx electron-builder --win nsis --win portable --linux -p always", "publish:windows": "npx electron-builder --win nsis --win portable -p always", "publish:linux": "npx electron-builder --linux -p always" |