Skip to content

Commit

Permalink
release: 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc520 committed Oct 21, 2024
1 parent d11c00c commit 6b2b21e
Show file tree
Hide file tree
Showing 3 changed files with 169 additions and 1 deletion.
107 changes: 107 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: CI

on:
workflow_dispatch:
push:
branches:
- dev
pull_request:
branches:
- dev

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
# os: [ windows-latest, ubuntu-latest, macos-latest ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: '9'

- name: Install dependencies
run: pnpm install

- name: Compile project
run: pnpm run build:compile

- name: Build for Windows
if: matrix.os == 'windows-latest'
run: pnpm run build:win

- name: Build for Linux
if: matrix.os == 'ubuntu-latest'
run: pnpm run build:linux

# - name: Build for MacOS
# if: matrix.os == 'macos-latest' && (secrets.MACOS_CERTIFICATE && secrets.MACOS_CERTIFICATE_PASSWORD)
# run: pnpm run build:mac

- name: Upload Artifact for Windows x64 Setup
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: easytier-manager-windows-x64_Setup
path: release/*win-x64*.exe

- name: Upload Artifact for Windows x86 Setup
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: easytier-manager-windows-x86_Setup
path: release/*win-ia32*.exe

- name: Upload Artifact for Windows x64 zip
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: easytier-manager-windows-x64
path: release/*win-x64*.zip

- name: Upload Artifact for Windows x86 zip
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: easytier-manager-windows-x86
path: release/*win-ia32*.zip

- name: Upload Artifact for Linux tar.gz
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: easytier-manager-linux.tar.gz
path: release/*.tar.gz

- name: Upload Artifact for Linux AppImage
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: easytier-manager-linux-AppImage
path: release/*.AppImage

- name: Upload Artifact for Linux deb
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: easytier-manager-linux-deb
path: release/*.deb

# - name: Upload Artifacts for MacOS
# if: matrix.os == 'macos-latest' && (secrets.MACOS_CERTIFICATE && secrets.MACOS_CERTIFICATE_PASSWORD)
# uses: actions/upload-artifact@v3
# with:
# name: macos-build
# path: dist/mac
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build and Package Electron App

on:
workflow_dispatch:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-latest, macos-latest ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Setup pnpm
run: npm install -g pnpm@9

- name: Install dependencies
run: pnpm install

- name: Compile project
run: pnpm run build:compile

- name: Build for Windows
if: matrix.os == 'windows-latest'
run: pnpm run build:win

- name: Build for Linux
if: matrix.os == 'ubuntu-latest'
run: pnpm run build:linux

- name: Build for MacOS
if: matrix.os == 'macos-latest'
run: pnpm run build:mac

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: release-${{ matrix.os }}
path: release

- name: Upload to GitHub Releases
if: matrix.os == 'windows-latest' || matrix.os == 'ubuntu-latest' || (matrix.os == 'macos-latest' && env.MACOS_CERTIFICATE)
uses: softprops/action-gh-release@v1
with:
files: |
release/*.exe
release/*.zip
release/*.deb
release/*.AppImage
release/*.tar.gz
release/*.rpm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion electron-builder.json5
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// "compression": "store",
"artifactName": "${productName}-${os}-${arch}_${version}.${ext}",
"directories": {
"output": "release/${version}"
"output": "release"
},
"files": [
"dist-electron",
Expand Down

0 comments on commit 6b2b21e

Please sign in to comment.