Commit 2954b7d4 authored by ransome1's avatar ransome1
Browse files

Optimize CI, switch to yarn

parent fa6c5918
name: Test, build & release
name: Code scan, build & release
on: push
jobs:
njsscan:
name: njsscan code scanning
name: njsscan
runs-on: ubuntu-latest
steps:
- name: Checkout the code
......@@ -36,13 +36,13 @@ jobs:
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
release:
macos:
needs: codeql
name: Build & release
name: MacOS (Build & Release)
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [macos-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v1
......@@ -50,17 +50,57 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 14
- run: npm install electron-builder --save-dev
- name: Build/release Electron app
- name: Run Electron Builder
uses: samuelmeuli/action-electron-builder@v1
with:
max_attempts: 3
github_token: ${{ secrets.github_token }}
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
windows:
needs: codeql
name: Windows (Build & Release)
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 14
- name: Run Electron Builder
env:
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
CSC_LINK: ${{ secrets.CSC_LINK }}
uses: samuelmeuli/action-electron-builder@v1
with:
max_attempts: 3
github_token: ${{ secrets.github_token }}
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
linux:
needs: codeql
name: Linux (Build & Release)
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 14
- name: Run Electron Builder
uses: samuelmeuli/action-electron-builder@v1
with:
max_attempts: 3
github_token: ${{ secrets.github_token }}
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
mirror:
needs: release
needs: [windows, macos, linux]
name: Mirror code to opencode.net
runs-on: ubuntu-latest
steps:
......
......@@ -17,3 +17,4 @@ Thumbs.db
flatpak/generated-sources.json
flatpak/com.github.ransome1.sleek.yml
assets/icons/bak
squashfs-root/
......@@ -59,10 +59,10 @@ You can download sleek for Windows, MacOS and Linux from
- <a href="https://github.com/ransome1/sleek/releases/latest">Github</a>
### Build sleek from source code
1. Setup <a href="https://docs.github.com/en/github/getting-started-with-github/set-up-git" target="blank">Git</a> and <a href="https://nodejs.org/" target="blank">node.js</a>
1. Setup <a href="https://docs.github.com/en/github/getting-started-with-github/set-up-git" target="blank">Git</a>, <a href="https://nodejs.org/" target="blank">node.js</a> and yarn.
2. Clone sleek `git clone https://github.com/ransome1/sleek.git` and cd into sleeks directory
3. Install dependencies `npm install`
4. Build sleek `npm run dist` (Binaries for all plattforms will be put into the `dist` folder)
3. Install dependencies `yarn install`
4. Build sleek `yarn build:windows` or `yarn build:linux` or `yarn build:macos`
### sleeks Roadmap 2021
A prioritized backlog for new features and known issues can be found on <a href="https://github.com/ransome1/sleek/projects/2">sleeks' roadmap for 2021</a>.
......
......@@ -5,7 +5,6 @@ files:
- filter:
- '!__tests__${/*}'
- '!System Volume Information${/*}'
- '!flatpak${/*}'
- '!build${/*}'
- '!snap${/*}'
- '!flatpak${/*}'
......
This diff is collapsed.
......@@ -18,17 +18,87 @@
"icon": "assets/icons/icon.png",
"main": "src/main.js",
"buildResources": "src",
"build": {
"files": [
"!System Volume Information${/*}",
"!flatpak${/*}",
"!build${/*}",
"!snap${/*}",
"!.git${/*}",
"!.github${/*}",
"!dist${/*}",
"!**.pfx",
"!**.bak",
"!**.md",
"!assets/screenshots${/*}",
"!assets/icons/bak${/*}",
"!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme,test,__tests__,tests,powered-test,example,examples,*.d.ts}",
"!**/node_modules/.bin",
"!**/*.{o,hprof,orig,pyc,pyo,rbc}",
"!**/._*",
"!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,__pycache__,thumbs.db,.gitignore,.gitattributes,.editorconfig,.flowconfig,.yarn-metadata.json,.idea,appveyor.yml,.travis.yml,circle.yml,npm-debug.log,.nyc_output,yarn.lock,.yarn-integrity}",
"!**/node_modules/search-index/si${/*}"
],
"appId": "RobinAhle.sleektodomanager",
"linux": {
"icon": "assets/icons/icon.png",
"category": "ProjectManagement",
"target": [
"deb",
"freebsd",
"rpm",
"AppImage"
]
},
"mac": {
"target": "dmg",
"icon": "assets/icons/sleek.icns",
"category": "public.app-category.productivity"
},
"nsis": {
"artifactName": "${productName}-${version}-Setup.${ext}"
},
"win": {
"target": [
"portable",
"nsis"
],
"icon": "assets/icons/sleek.ico",
"publisherName": "CN=2B3D4037-FF2E-4C36-84A6-CFF49F585C0C",
"artifactName": "${productName}-${version}.${ext}"
},
"appx": {
"displayName": "sleek - Todo.txt app for Windows, free and open-source",
"identityName": "17450RobinAhle.sleektodomanager",
"publisher": "CN=2B3D4037-FF2E-4C36-84A6-CFF49F585C0C",
"publisherDisplayName": "Robin Ahle",
"applicationId": "RobinAhle.sleektodomanager"
}
},
"appImage": {
"artifactName": "${productName}-${version}-${arch}.${ext}"
},
"rpm": {
"artifactName": "${productName}-${version}-${arch}.${ext}"
},
"deb": {
"artifactName": "${productName}-${version}-${arch}.${ext}"
},
"freebsd": {
"artifactName": "${productName}-${version}-${arch}.${ext}"
},
"scripts": {
"build:windows": "electron-builder -w --publish never",
"build:macos": "electron-builder -m --publish never",
"build:linux": "electron-builder -l --publish never",
"build:appx": "electron-builder -w appx --publish never",
"build:pacman": "electron-builder -l pacman --publish never",
"build:appimage": "electron-builder -l AppImage --publish never",
"test": "jest",
"pack": "electron-builder --dir",
"dist": "electron-builder -mwl --publish never",
"appx": "electron-builder -w appx --publish never",
"win": "electron-builder -w --publish never",
"pacman": "electron-builder -l pacman",
"appimage": "electron-builder -l AppImage --publish never",
"css-build": "node-sass src/scss/ --output src/css/",
"css-watch": "npm run css-build -- --watch",
"start": "npm run css-watch & NODE_ENV=development electron ."
"css-build": "node-sass src/scss/ -o src/css/",
"css-watch": "node-sass src/scss/ -wo src/css/",
"start": "yarn css-build & yarn css-watch & electron ."
},
"dependencies": {
"bulma": "^0.9.2",
......@@ -40,7 +110,6 @@
"devDependencies": {
"electron": "^12.0.4",
"electron-builder": "^22.10.5",
"electron-packager": "^15.2.0",
"jest": "^26.6.3",
"spectron": "^14.0.0"
}
......
name: sleek
base: core18
version: '1.0.1'
version: '1.0.2'
summary: Todo app based on the todo.txt format for Linux, free and open-source
description: |
sleek is an open-source todo app that makes use of the todo.txt format. sleeks GUI is modern and clean yet offers a decent set of functions which help users getting things done. sleek is available as a client for Windows, MacOS and Linux.
......@@ -49,7 +49,9 @@ parts:
export GLOBAL_AGENT_HTTP_PROXY="${http_proxy}"
export GLOBAL_AGENT_HTTPS_PROXY="${http_proxy}"
fi
npm install
yarn add electron-packager@latest
yarn install
electron-packager . --overwrite --platform=linux --output=release-build \
--prune=true --out $SNAPCRAFT_PART_INSTALL/
mv $SNAPCRAFT_PART_INSTALL/$SNAPCRAFT_PROJECT_NAME-linux-* \
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment