Skip to content

Commit

Permalink
add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
lf-wxp committed Feb 23, 2022
1 parent ec3bdc0 commit e45e2d6
Show file tree
Hide file tree
Showing 19 changed files with 53 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "release"
on:
workflow_dispatch:

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

strategy:
matrix:
os: [macos-latest, ubuntu-latest, 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: 12
- name: get version
run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
- name: install app dependencies and build it
run: npm i && npm run dist
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}

# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
# release: ${{ startsWith(github.ref, 'refs/tags/v') }}
# release: ${{ env.PACKAGE_VERSION }}
release: v1.0.0
Binary file added icon/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/[email protected]
Binary file not shown.
Binary file added icon/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/icon.icns
Binary file not shown.
Binary file added icon/icon.ico
Binary file not shown.
Binary file added icon/icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icon/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/source.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 16 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"description": "betterkonachan electron version",
"main": "dist/main.js",
"scripts": {
"dist": "npx rimraf dist/* && npm run main:build && npm run render:build && npm run copy && electron-builder --win --x64",
"dist": "npx rimraf dist/* && npm run main:build && npm run render:build && npm run copy && npm run copy:icon",
"convert": "convert -density 512x512 -background transparent ./assets/image/icon.svg -define icon:auto-resize -colors 512 ./assets/image/icon.ico",
"copy": "copyfiles -f ./assets/image/splash.svg ./assets/image/icon.ico dist",
"copy:icon": "copyfiles -f ./icon/* dist",
"render:dev": "webpack-dev-server --inline --config ./webpack/render.dev.ts",
"render:build": "webpack --config ./webpack/render.prod.ts",
"lint": "eslint ./**/*.{ts,tsx,js}",
Expand All @@ -15,24 +16,36 @@
"codecov": "codecov",
"main:start": "electron .",
"main:watch": "webpack --mode development --watch --config ./webpack/main.ts",
"main:build": "webpack --mode production --config ./webpack/main.ts"
"main:build": "webpack --mode production --config ./webpack/main.ts",
"postinstall": "electron-builder install-app-deps",
"build": "electron-builder --mac --windows --linux",
"release": "electron-builder --mac --windows --linux --publish always"
},
"keywords": [
"betterkonachan",
"electron"
],
"author": "[email protected]",
"build": {
"appId": "BetterKonacha",
"appId": "Konachan",
"files": [
"./dist/**/*"
],
"mac": {
"target": ["default"],
"category": "public.app-category.lifestyle",
"icon": "dist/icon.icns"
},
"win": {
"target": [
"nsis",
"zip"
],
"icon": "dist/icon.ico"
},
"linux": {
"target": ["AppImage"],
"category": "Office"
}
},
"pre-commit": [
Expand Down

0 comments on commit e45e2d6

Please sign in to comment.