mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 10:00:17 +05:30
- Bump version to 4.1.0 in package.json and index.html - Add build:local script for combined Linux + Windows local builds - Add CI workflow: runs tests on push/PR to master - Add Release workflow: tag-triggered (v*), parallel Linux + Windows builds, publishes all packages to GitHub Releases Amit Haridas
100 lines
2.1 KiB
YAML
100 lines
2.1 KiB
YAML
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/*
|