Update README.md #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
os: | |
- windows-latest | |
- ubuntu-latest | |
# - macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: latest | |
architecture: x64 | |
check-latest: true | |
cache: npm | |
cache-dependency-path: "**/package.json" | |
- name: Build executable | |
run: | | |
if [ $RUNNER_OS == "Windows" ]; then | |
ext=".exe" | |
else | |
ext="" | |
fi | |
cd client | |
npm install | |
NODE_OPTIONS=--openssl-legacy-provider npm run build | |
cd ../server-node | |
npm install | |
npm install --save-dev caxa | |
npx caxa \ | |
--input . \ | |
--output "../dist/cloud-clipboard${ext}" \ | |
--exclude \ | |
".*" \ | |
"config.json" \ | |
"package-lock.json" \ | |
-- \ | |
"{{caxa}}/node_modules/.bin/node" \ | |
"{{caxa}}/main.js" | |
- name: Upload result (server) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cloud-clipboard-${{ runner.os }} | |
path: dist | |
- name: Upload result (frontend static files) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: static-${{ runner.os }} | |
path: server-node/static |