diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b82b5f1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..60d497a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,99 @@ +name: Release + +on: + push: + tags: ['v*'] + +permissions: + contents: write + +jobs: + build-linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install rpmbuild + run: sudo apt-get update && sudo apt-get install -y rpm + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm test + + - name: Build Linux packages + run: npm run build:linux + + - name: Upload Linux artifacts + uses: actions/upload-artifact@v4 + with: + name: linux-artifacts + path: | + dist/*.deb + dist/*.AppImage + dist/*.snap + dist/*.rpm + retention-days: 5 + + build-windows: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install Wine and NSIS + run: | + sudo dpkg --add-architecture i386 + sudo apt-get update + sudo apt-get install -y wine64 wine32 nsis + + - name: Install dependencies + run: npm ci + + - name: Build Windows packages + run: npm run build:win + + - name: Upload Windows artifacts + uses: actions/upload-artifact@v4 + with: + name: windows-artifacts + path: | + dist/*.exe + dist/*-win.zip + retention-days: 5 + + release: + needs: [build-linux, build-windows] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Download Linux artifacts + uses: actions/download-artifact@v4 + with: + name: linux-artifacts + path: dist + + - name: Download Windows artifacts + uses: actions/download-artifact@v4 + with: + name: windows-artifacts + path: dist + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + files: dist/* diff --git a/package.json b/package.json index 13e48f0..9078a09 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "markdown-converter", - "version": "4.0.0", + "version": "4.1.0", "description": "Professional Markdown editor and universal file converter with PDF editing, batch processing, and syntax highlighting", "main": "src/main.js", "scripts": { @@ -18,6 +18,7 @@ "build:win-unsigned": "cross-env CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --win", "build:mac": "electron-builder --mac", "build:linux": "electron-builder --linux", + "build:local": "electron-builder --linux --win", "dist": "electron-builder --publish=never", "dist:all": "electron-builder -mwl", "generate-icons": "node scripts/generate-icons.js" diff --git a/src/index.html b/src/index.html index 1f96f37..04e071f 100644 --- a/src/index.html +++ b/src/index.html @@ -29,7 +29,7 @@ MarkdownConverter