Skip to content

Commit a99c587

Browse files
hidakatsuyamugi-uno
authored andcommitted
Enable testing and releasing workflow
Co-authored-by: mugi-uno <mugi.uno@gmail.com>
1 parent 4aeea5b commit a99c587

2 files changed

Lines changed: 83 additions & 0 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build and release section-report
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
defaults:
9+
run:
10+
working-directory: section_report
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ${{ matrix.os }}
16+
17+
strategy:
18+
matrix:
19+
os: [macos-latest, ubuntu-latest, windows-latest]
20+
include:
21+
- os: macos-latest
22+
package-ext: .dmg
23+
- os: ubuntu-latest
24+
package-ext: .AppImage
25+
- os: windows-latest
26+
package-ext: .exe
27+
28+
steps:
29+
- uses: actions/checkout@v2
30+
31+
- name: Install Node.js
32+
uses: actions/setup-node@v1
33+
with:
34+
node-version: 13
35+
36+
- name: Install npm packages
37+
run: npm install
38+
39+
- name: Build package
40+
run: npm run electron:build
41+
42+
- name: Prepare package
43+
run: |
44+
mkdir package
45+
mv dist_electron/*${{ matrix.package-ext }} package/
46+
47+
- name: Release
48+
uses: softprops/action-gh-release@v1
49+
with:
50+
files: "section_report/package/**"
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test section-report
2+
3+
on:
4+
push:
5+
paths:
6+
- 'section_report/**'
7+
8+
defaults:
9+
run:
10+
working-directory: section_report
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
node-version:
18+
- 13.x
19+
20+
steps:
21+
- uses: actions/checkout@v1
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v1
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
- name: Build and test with lint
27+
run: |
28+
npm install
29+
npm run test:lint
30+
npm run build
31+
npm run test:unit

0 commit comments

Comments
 (0)