From 531b139b4026ae120e643067e911aa2725de6913 Mon Sep 17 00:00:00 2001 From: TankNee Date: Wed, 30 Jun 2021 17:24:08 +0800 Subject: [PATCH] [fix]: write release script and remove vditor package --- .github/workflows/BuildAndRelease.yml | 79 ++++++++++++++++++++------- .github/workflows/Memocast.yml | 16 ++++++ package-lock.json | 31 +---------- package.json | 3 +- 4 files changed, 78 insertions(+), 51 deletions(-) diff --git a/.github/workflows/BuildAndRelease.yml b/.github/workflows/BuildAndRelease.yml index a6b0bbd..55c958b 100644 --- a/.github/workflows/BuildAndRelease.yml +++ b/.github/workflows/BuildAndRelease.yml @@ -1,6 +1,6 @@ # This is a basic workflow to help you get started with Actions -name: Neeto-Vue Release Action +name: Memocast Release Action # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch @@ -22,7 +22,9 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Check out branch - uses: actions/checkout@master + uses: actions/checkout@v2 + with: + ref: rebuild/analysis - name: Install Node.js, NPM uses: actions/setup-node@v1 @@ -33,16 +35,22 @@ jobs: run: | npm install npm run build-publish - - name: Compress Bundle + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Rename Package run: | - npm install -g bestzip - cd dist/electron - bestzip Neeto-Vue-win32-x64.zip Neeto-Vue-win32-x64/* + cd dist/electron/Packaged + ren Memocast*.exe Memocast-Setup.exe - name: Upload Win Package uses: actions/upload-artifact@v1 with: name: Windows_Dist - path: dist/electron/Neeto-Vue-win32-x64.zip + path: dist/electron/Packaged/Memocast-Setup.exe + - name: Upload latest.yml + uses: actions/upload-artifact@v1 + with: + name: Windows_latest_yml + path: dist/electron/Packaged/latest.yml build-linux: # The type of runner that the job will run on runs-on: ubuntu-latest @@ -51,7 +59,9 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Check out branch - uses: actions/checkout@master + uses: actions/checkout@v2 + with: + ref: rebuild/analysis - name: Install Node.js, NPM uses: actions/setup-node@v1 @@ -61,16 +71,22 @@ jobs: run: | npm install npm run build-publish - - name: Compress Bundle + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Rename Package run: | - npm install -g bestzip - cd dist/electron - bestzip Neeto-Vue-linux-x64.zip Neeto-Vue-linux-x64/* + cd dist/electron/Packaged + cp Memocast*.AppImage Memocast-x86_64.AppImage - name: Upload Linux Package uses: actions/upload-artifact@v1 with: name: Linux_Dist - path: dist/electron/Neeto-Vue-linux-x64.zip + path: dist/electron/Packaged/Memocast-x86_64.AppImage + - name: Upload latest-linux.yml + uses: actions/upload-artifact@v1 + with: + name: Linux_latest_yml + path: dist/electron/Packaged/latest-linux.yml build-mac: # The type of runner that the job will run on runs-on: macos-latest @@ -79,7 +95,9 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Check out branch - uses: actions/checkout@master + uses: actions/checkout@v2 + with: + ref: rebuild/analysis - name: Install Node.js, NPM uses: actions/setup-node@v1 @@ -89,16 +107,22 @@ jobs: run: | npm install npm run build-publish - - name: Compress Bundle + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Rename Package run: | - npm install -g bestzip - cd dist/electron - bestzip Neeto-Vue-darwin-x64.zip Neeto-Vue-darwin-x64/* + cd dist/electron/Packaged + cp Memocast*.dmg Memocast.dmg - name: Upload Mac Package uses: actions/upload-artifact@v1 with: name: MacOS_Dist - path: dist/electron/Neeto-Vue-darwin-x64.zip + path: dist/electron/Packaged/Memocast.dmg + - name: Upload latest-mac.yml + uses: actions/upload-artifact@v1 + with: + name: Mac_latest_yml + path: dist/electron/Packaged/latest-mac.yml release: needs: [build-windows, build-linux, build-mac] runs-on: ubuntu-latest @@ -110,21 +134,36 @@ jobs: with: name: Linux_Dist path: artifacts + - name: Download latest-linux.yml + uses: actions/download-artifact@v1 + with: + name: Linux_latest_yml + path: artifacts - name: Download pre-built packages for Windows uses: actions/download-artifact@v1 with: name: Windows_Dist path: artifacts + - name: Download latest.yml + uses: actions/download-artifact@v1 + with: + name: Windows_latest_yml + path: artifacts - name: Download pre-built packages for MacOS uses: actions/download-artifact@v1 with: name: MacOS_Dist path: artifacts + - name: Download latest-mac.yml + uses: actions/download-artifact@v1 + with: + name: Mac_latest_yml + path: artifacts - name: Create Release id: create_release uses: ncipollo/release-action@v1 with: - name: Neeto-Vue + name: Memocast token: ${{ secrets.GITHUB_TOKEN }} artifacts: "artifacts/*" draft: true diff --git a/.github/workflows/Memocast.yml b/.github/workflows/Memocast.yml index cee85fb..9ff0326 100644 --- a/.github/workflows/Memocast.yml +++ b/.github/workflows/Memocast.yml @@ -123,6 +123,7 @@ jobs: # release: # needs: [build-windows, build-linux, build-mac] # runs-on: ubuntu-latest +# if: contains(github.ref, 'refs/tags/v') # steps: # - uses: actions/checkout@v1 # - name: Download pre-built packages for Linux @@ -130,16 +131,31 @@ jobs: # with: # name: Linux_Dist # path: artifacts +# - name: Download latest-linux.yml +# uses: actions/download-artifact@v1 +# with: +# name: Linux_latest_yml +# path: artifacts # - name: Download pre-built packages for Windows # uses: actions/download-artifact@v1 # with: # name: Windows_Dist # path: artifacts +# - name: Download latest.yml +# uses: actions/download-artifact@v1 +# with: +# name: Windows_latest_yml +# path: artifacts # - name: Download pre-built packages for MacOS # uses: actions/download-artifact@v1 # with: # name: MacOS_Dist # path: artifacts +# - name: Download latest-mac.yml +# uses: actions/download-artifact@v1 +# with: +# name: Mac_latest_yml +# path: artifacts # - name: Create Release # id: create_release # uses: ncipollo/release-action@v1 diff --git a/package-lock.json b/package-lock.json index d2ef997..34c0ae7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cn.memocast.app", - "version": "1.0.4", + "version": "2.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "cn.memocast.app", - "version": "1.0.4", + "version": "2.0.0", "license": "MIT", "dependencies": { "@altairwei/wiz-markdown": "^1.0.13", @@ -43,7 +43,6 @@ "turndown": "^6.0.0", "underscore": "^1.9.2", "unsplash-js": "^6.0.0", - "vditor": "^3.8.5", "vega": "^5.10.0", "vega-embed": "^6.4.0", "vega-lite": "^4.7.0", @@ -7473,11 +7472,6 @@ "humanize-plus": "^1.8.1" } }, - "node_modules/diff-match-patch": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz", - "integrity": "sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==" - }, "node_modules/diffie-hellman": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", @@ -20003,14 +19997,6 @@ "node": ">= 0.8" } }, - "node_modules/vditor": { - "version": "3.8.5", - "resolved": "https://registry.npmjs.org/vditor/-/vditor-3.8.5.tgz", - "integrity": "sha512-crBWF6IcEy6rnu1owtHAshIcVddsZ6dn4FCWtwrAIQTChnWSPcDXoLIMX0eu5YFQW16VOEg1aXY3sqcK30ftLA==", - "dependencies": { - "diff-match-patch": "^1.0.5" - } - }, "node_modules/vega": { "version": "5.20.2", "resolved": "https://registry.npm.taobao.org/vega/download/vega-5.20.2.tgz", @@ -30045,11 +30031,6 @@ "humanize-plus": "^1.8.1" } }, - "diff-match-patch": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz", - "integrity": "sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==" - }, "diffie-hellman": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", @@ -40656,14 +40637,6 @@ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", "dev": true }, - "vditor": { - "version": "3.8.5", - "resolved": "https://registry.npmjs.org/vditor/-/vditor-3.8.5.tgz", - "integrity": "sha512-crBWF6IcEy6rnu1owtHAshIcVddsZ6dn4FCWtwrAIQTChnWSPcDXoLIMX0eu5YFQW16VOEg1aXY3sqcK30ftLA==", - "requires": { - "diff-match-patch": "^1.0.5" - } - }, "vega": { "version": "5.20.2", "resolved": "https://registry.npm.taobao.org/vega/download/vega-5.20.2.tgz", diff --git a/package.json b/package.json index 025e107..c85c3ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cn.memocast.app", - "version": "1.0.4", + "version": "2.0.0", "description": "An Awesome WizNote Desktop Application", "productName": "Memocast", "author": "tanknee ", @@ -55,7 +55,6 @@ "turndown": "^6.0.0", "underscore": "^1.9.2", "unsplash-js": "^6.0.0", - "vditor": "^3.8.5", "vega": "^5.10.0", "vega-embed": "^6.4.0", "vega-lite": "^4.7.0",