Skip to content

Commit fcc2e4e

Browse files
authored
Merge pull request #9 from darkcl/develop
Develop
2 parents 77f4b28 + e0c61f9 commit fcc2e4e

26 files changed

+3647
-84
lines changed

.github/workflows/main.yml

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
name: build
2+
on: [push]
3+
jobs:
4+
build-ui:
5+
name: Build UI Assets
6+
runs-on: ${{ matrix.os }}
7+
strategy:
8+
matrix:
9+
os: [ubuntu-latest]
10+
node-version: [12.x]
11+
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Building UI assets with Node.js ${{ matrix.node-version }}
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: ${{ matrix.node-version }}
18+
- name: npm install, build, and test
19+
run: |
20+
cd ui
21+
yarn install
22+
yarn build
23+
cd dist/
24+
env:
25+
CI: true
26+
27+
- name: Upload Artifacts
28+
uses: actions/upload-artifact@v1
29+
with:
30+
name: notorious-ui
31+
path: ui/dist
32+
33+
build-mac:
34+
name: Build macOS Application
35+
needs: build-ui
36+
runs-on: ${{ matrix.os }}
37+
strategy:
38+
matrix:
39+
os: [macOS-10.14]
40+
node-version: [12.x]
41+
42+
steps:
43+
- uses: actions/checkout@v1
44+
45+
- uses: actions/download-artifact@master
46+
with:
47+
name: notorious-ui
48+
path: ui/dist
49+
50+
- name: List directory
51+
run: |
52+
ls ui/dist
53+
54+
- name: Using Node.js ${{ matrix.node-version }}
55+
uses: actions/setup-node@v1
56+
with:
57+
node-version: ${{ matrix.node-version }}
58+
59+
- name: Install create-dmg
60+
run: |
61+
npm i -g create-dmg
62+
63+
- name: Set up Go 1.13
64+
uses: actions/setup-go@v1
65+
with:
66+
go-version: 1.13
67+
id: go
68+
69+
- name: Get dependencies
70+
run: |
71+
go get -v -t -d ./...
72+
73+
- name: Build macOS Application
74+
env:
75+
GO111MODULE: on
76+
run: |
77+
make build-mewn
78+
mkdir -p ./build/Production/Notorious.app/Contents/MacOS
79+
mkdir -p ./build/Production/Notorious.app/Contents/Resources
80+
cp ./meta/Info.plist ./build/Production/Notorious.app/Contents/
81+
build/mewn build -o build/Production/Notorious.app/Contents/MacOS/Notorious
82+
make -i build-dmg
83+
84+
- name: Upload Artifacts
85+
uses: actions/upload-artifact@v1
86+
with:
87+
name: notorious-mac
88+
path: Notorious 0.0.1.dmg
89+
90+
build-win32:
91+
name: Build Windows Application
92+
needs: build-ui
93+
runs-on: ${{ matrix.os }}
94+
strategy:
95+
matrix:
96+
os: [windows-2019]
97+
node-version: [12.x]
98+
99+
steps:
100+
- uses: actions/checkout@v1
101+
102+
- uses: actions/download-artifact@master
103+
with:
104+
name: notorious-ui
105+
path: ui/dist
106+
107+
- name: List directory
108+
run: |
109+
dir .\ui\dist
110+
111+
- name: Set up Go 1.13
112+
uses: actions/setup-go@v1
113+
with:
114+
go-version: 1.13
115+
id: go
116+
117+
- name: Get dependencies
118+
run: |
119+
go get -v -t -d ./...
120+
121+
- name: Build windows application
122+
env:
123+
GO111MODULE: on
124+
run: |
125+
go build -o .\build\mewn.exe cmd\mewn\main.go
126+
mkdir -p .\build\Production
127+
.\build\mewn.exe build -o .\build\Production\Notorious.exe
128+
129+
- name: Upload Artifacts
130+
uses: actions/upload-artifact@v1
131+
with:
132+
name: notorious-win32
133+
path: build\Production\Notorious.exe

.github/workflows/release.yml

+185
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- "v*"
6+
7+
jobs:
8+
build-ui:
9+
name: Build UI Assets
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest]
14+
node-version: [12.x]
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
- name: Building UI assets with Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- name: npm install, build, and test
23+
run: |
24+
cd ui
25+
yarn install
26+
yarn build
27+
cd dist/
28+
env:
29+
CI: true
30+
31+
- name: Upload Artifacts
32+
uses: actions/upload-artifact@v1
33+
with:
34+
name: notorious-ui
35+
path: ui/dist
36+
37+
build-mac:
38+
name: Build macOS Application
39+
needs: build-ui
40+
runs-on: ${{ matrix.os }}
41+
strategy:
42+
matrix:
43+
os: [macOS-10.14]
44+
node-version: [12.x]
45+
46+
steps:
47+
- uses: actions/checkout@v1
48+
49+
- uses: actions/download-artifact@master
50+
with:
51+
name: notorious-ui
52+
path: ui/dist
53+
54+
- name: List directory
55+
run: |
56+
ls ui/dist
57+
58+
- name: Using Node.js ${{ matrix.node-version }}
59+
uses: actions/setup-node@v1
60+
with:
61+
node-version: ${{ matrix.node-version }}
62+
63+
- name: Install create-dmg
64+
run: |
65+
npm i -g create-dmg
66+
67+
- name: Set up Go 1.13
68+
uses: actions/setup-go@v1
69+
with:
70+
go-version: 1.13
71+
id: go
72+
73+
- name: Get dependencies
74+
run: |
75+
go get -v -t -d ./...
76+
77+
- name: Build macOS Application
78+
env:
79+
GO111MODULE: on
80+
run: |
81+
make build-mewn
82+
mkdir -p ./build/Production/Notorious.app/Contents/MacOS
83+
mkdir -p ./build/Production/Notorious.app/Contents/Resources
84+
cp ./meta/Info.plist ./build/Production/Notorious.app/Contents/
85+
build/mewn build -o build/Production/Notorious.app/Contents/MacOS/Notorious
86+
make -i build-dmg
87+
88+
- name: Upload Artifacts
89+
uses: actions/upload-artifact@v1
90+
with:
91+
name: notorious-mac
92+
path: Notorious 0.0.1.dmg
93+
94+
build-win32:
95+
name: Build Windows Application
96+
needs: build-ui
97+
runs-on: ${{ matrix.os }}
98+
strategy:
99+
matrix:
100+
os: [windows-2019]
101+
node-version: [12.x]
102+
103+
steps:
104+
- uses: actions/checkout@v1
105+
106+
- uses: actions/download-artifact@master
107+
with:
108+
name: notorious-ui
109+
path: ui/dist
110+
111+
- name: List directory
112+
run: |
113+
dir .\ui\dist
114+
115+
- name: Set up Go 1.13
116+
uses: actions/setup-go@v1
117+
with:
118+
go-version: 1.13
119+
id: go
120+
121+
- name: Get dependencies
122+
run: |
123+
go get -v -t -d ./...
124+
125+
- name: Build windows application
126+
env:
127+
GO111MODULE: on
128+
run: |
129+
go build -o .\build\mewn.exe cmd\mewn\main.go
130+
mkdir -p .\build\Production
131+
.\build\mewn.exe build -o .\build\Production\Notorious.exe
132+
133+
- name: Upload Artifacts
134+
uses: actions/upload-artifact@v1
135+
with:
136+
name: notorious-win32
137+
path: build\Production\notorious.exe
138+
139+
release:
140+
name: Upload Release Asset
141+
needs: [build-mac, build-win32]
142+
runs-on: ubuntu-latest
143+
steps:
144+
- uses: actions/download-artifact@master
145+
with:
146+
name: notorious-mac
147+
path: mac
148+
149+
- uses: actions/download-artifact@master
150+
with:
151+
name: notorious-win32
152+
path: win32
153+
154+
- name: Create Release
155+
id: create_release
156+
uses: actions/create-release@v1.0.0
157+
env:
158+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
159+
with:
160+
tag_name: ${{ github.ref }}
161+
release_name: Release ${{ github.ref }}
162+
draft: false
163+
prerelease: false
164+
165+
- name: Upload Release Windows
166+
id: upload-release-asset-win32
167+
uses: actions/upload-release-asset@v1.0.1
168+
env:
169+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
170+
with:
171+
upload_url: ${{ steps.create_release.outputs.upload_url }}
172+
asset_path: ./win32/notorious.exe
173+
asset_name: notorious.exe
174+
asset_content_type: application/vnd.microsoft.portable-executable
175+
176+
- name: Upload Release MacOS
177+
id: upload-release-asset-macos
178+
uses: actions/upload-release-asset@v1.0.1
179+
env:
180+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
181+
with:
182+
upload_url: ${{ steps.create_release.outputs.upload_url }}
183+
asset_path: ./mac/Notorious 0.0.1.dmg
184+
asset_name: Notorious 0.0.1.dmg
185+
asset_content_type: application/octet-stream

Makefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
.PHONY: build debug
1+
.PHONY: build build-mewn debug
2+
3+
build-mewn:
4+
@go build -o build/mewn cmd/mewn/main.go
5+
6+
build-dmg:
7+
create-dmg ./build/Production/Notorious.app
28

39
build:
410
@rm -Rf ./build/Production/Notorious.app/

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
</p>
55
<p>
66
<img alt="Version" src="https://img.shields.io/badge/version-0.0.1-blue.svg?cacheSeconds=2592000" />
7+
<img alt="build status" src=https://github.com/darkcl/Notorious/workflows/build/badge.svg />
8+
<img alt="release status" src=https://github.com/darkcl/Notorious/workflows/release/badge.svg />
79
<a href="https://twitter.com/darkcl_dev">
810
<img alt="Twitter: darkcl_dev" src="https://img.shields.io/twitter/follow/darkcl_dev.svg?style=social" target="_blank" />
911
</a>

0 commit comments

Comments
 (0)