Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

Commit

Permalink
add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
lunnlew committed Nov 20, 2019
1 parent b4db3db commit a48c3f8
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 2 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/ReleaseBuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Release Build
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]
node-registry: ['https://registry.npmjs.org']
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: ${{ matrix.node-registry }}
- name: npm install, build, and test
run: |
npm install
npm test --if-present
npm run electron:build
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset For Win
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./stream-downloader.exe
asset_name: stream-downloader-winx64.exe
asset_content_type: application/vnd.microsoft.portable-executable
- name: Upload Release Asset For Linux
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./dist_electron/微采助手 Setup 0.1.0.exe
asset_name: 微采助手-Setup
asset_content_type: application/x-executable
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
"child_process": "^1.0.2",
"colorful": "^2.1.0",
"cron": "^1.7.2",
"electron": "^6.0.7",
"express": "^4.17.1",
"express-ws": "^4.0.0",
"fast-json-stringify": "^1.15.6",
"ffi-napi": "^2.4.5",
"fs-extra": "^8.1.0",
"iconv-lite": "^0.5.0",
"inquirer": "^7.0.0",
Expand Down Expand Up @@ -79,6 +79,8 @@
"@vue/test-utils": "1.0.0-beta.29",
"babel-eslint": "^10.0.1",
"chai": "^4.1.2",
"electron": "^6.0.10",
"electron-builder": "^21.2.0",
"eslint": "^5.16.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-plugin-vue": "^5.0.0",
Expand All @@ -89,4 +91,4 @@
"vue-template-compiler": "^2.6.10"
},
"__npminstall_done": false
}
}

0 comments on commit a48c3f8

Please sign in to comment.