Skip to content

Commit 91c045c

Browse files
authored
Merge pull request #24 from wednesday-solutions/dev
Dev
2 parents 22685ee + 50545a3 commit 91c045c

File tree

7 files changed

+229
-97
lines changed

7 files changed

+229
-97
lines changed

.github/workflows/beta-release.yml

Lines changed: 0 additions & 78 deletions
This file was deleted.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Publish App Alpha
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version: [16.x]
14+
15+
steps:
16+
- name: Checkout git repo
17+
uses: actions/checkout@v3
18+
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
cache: 'yarn'
24+
25+
- name: Install dependencies
26+
run: yarn
27+
28+
- name: Build
29+
run: yarn build
30+
31+
- name: Bump version and push tag
32+
run: |
33+
cd "$GITHUB_WORKSPACE"
34+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
35+
git config user.name "$GITHUB_ACTOR"
36+
npm version prerelease --preid=alpha
37+
git push
38+
39+
- name: get-npm-version
40+
id: package-version
41+
uses: martinbeentjes/npm-get-version-action@master
42+
43+
- name: Create Beta Release
44+
uses: actions/create-release@latest
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
with:
48+
tag_name: ${{ steps.package-version.outputs.current-version}}
49+
release_name: v${{ steps.package-version.outputs.current-version}}
50+
draft: false
51+
prerelease: true
52+
53+
- name: Publish releases
54+
env:
55+
# # These values are used for auto updates signing
56+
# APPLE_ID: ${{ secrets.APPLE_ID }}
57+
# APPLE_ID_PASS: ${{ secrets.APPLE_ID_PASS }}
58+
# CSC_LINK: ${{ secrets.CSC_LINK }}
59+
# CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
60+
# This is used for uploading release assets to github
61+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
EP_DRAFT: false
63+
EP_PRE_RELEASE: true
64+
run: |
65+
yarn run electron-builder -- --publish always --linux
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Publish Beta
2+
3+
on:
4+
push:
5+
branches:
6+
- staging
7+
8+
jobs:
9+
publish:
10+
# To enable auto publishing to github, update your electron publisher
11+
# # config in package.json > "build" and remove the conditional below
12+
# if: ${{ github.repository_owner == 'electron-react-boilerplate' }}
13+
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
node-version: [16.x]
18+
19+
steps:
20+
- name: Checkout git repo
21+
uses: actions/checkout@v3
22+
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v2
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
cache: 'yarn'
28+
29+
- name: Install dependencies
30+
run: yarn
31+
32+
- name: Build
33+
run: yarn build
34+
35+
- name: Bump version and push tag
36+
run: |
37+
cd "$GITHUB_WORKSPACE"
38+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
39+
git config user.name "$GITHUB_ACTOR"
40+
npm version prerelease --preid=beta
41+
git push
42+
43+
- name: get-npm-version
44+
id: package-version
45+
uses: martinbeentjes/npm-get-version-action@master
46+
47+
- name: Create Beta Release
48+
uses: actions/create-release@latest
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
with:
52+
tag_name: ${{ steps.package-version.outputs.current-version}}
53+
release_name: v${{ steps.package-version.outputs.current-version}}
54+
draft: false
55+
prerelease: true
56+
57+
- name: Publish releases
58+
env:
59+
# # These values are used for auto updates signing
60+
# APPLE_ID: ${{ secrets.APPLE_ID }}
61+
# APPLE_ID_PASS: ${{ secrets.APPLE_ID_PASS }}
62+
# CSC_LINK: ${{ secrets.CSC_LINK }}
63+
# CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
64+
# This is used for uploading release assets to github
65+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
EP_DRAFT: false
67+
EP_PRE_RELEASE: true
68+
run: |
69+
yarn run electron-builder -- --publish always --linux
Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,37 @@
1+
name: Publish Latest
2+
13
on:
24
push:
35
branches:
4-
# - master
5-
6-
name: Create Production Release
6+
- master
77

88
jobs:
9-
build:
10-
name: Create Production Release
9+
publish:
10+
# To enable auto publishing to github, update your electron publisher
11+
# # config in package.json > "build" and remove the conditional below
12+
# if: ${{ github.repository_owner == 'electron-react-boilerplate' }}
13+
1114
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
node-version: [16.x]
18+
1219
steps:
13-
- name: Actions Ecosystem Action Get Merged Pull Request
14-
uses: actions-ecosystem/action-get-merged-pull-request@v1.0.1
15-
id: getMergedPR
20+
- name: Checkout git repo
21+
uses: actions/checkout@v3
22+
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v2
1625
with:
17-
github_token: ${{ secrets.GITHUB_TOKEN }}
18-
- name: Checkout code
19-
uses: actions/checkout@v2
20-
- run: |
21-
git fetch --prune --unshallow --tags
26+
node-version: ${{ matrix.node-version }}
27+
cache: 'yarn'
28+
29+
- name: Install dependencies
30+
run: yarn
31+
32+
- name: Build
33+
run: yarn build
34+
2235
- name: Get Commit Message
2336
run: |
2437
declare -A category=( [fix]="" [chore]="" [revert]="" [build]="" [docs]="" [feat]="" [perf]="" [refactor]="" [style]="" [temp]="" [test]="" [ci]="" [others]="")
@@ -56,17 +69,20 @@ jobs:
5669
msg+="${categoryTitle[others]}${category[others]}"
5770
fi
5871
echo "COMMIT_MESSAGE=${msg}" >> $GITHUB_ENV
72+
5973
- name: Bump version and push tag
6074
run: |
6175
cd "$GITHUB_WORKSPACE"
6276
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
6377
git config user.name "$GITHUB_ACTOR"
6478
npm version patch
6579
git push
80+
6681
- name: get-npm-version
6782
id: package-version
6883
uses: martinbeentjes/npm-get-version-action@master
69-
- name: Create Prod Release
84+
85+
- name: Create Beta Release
7086
uses: actions/create-release@latest
7187
env:
7288
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -76,3 +92,17 @@ jobs:
7692
body: ${{ env.COMMIT_MESSAGE }}
7793
draft: false
7894
prerelease: false
95+
96+
- name: Publish releases
97+
env:
98+
# # These values are used for auto updates signing
99+
# APPLE_ID: ${{ secrets.APPLE_ID }}
100+
# APPLE_ID_PASS: ${{ secrets.APPLE_ID_PASS }}
101+
# CSC_LINK: ${{ secrets.CSC_LINK }}
102+
# CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
103+
# This is used for uploading release assets to github
104+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105+
EP_DRAFT: false
106+
EP_PRE_RELEASE: false
107+
run: |
108+
yarn run electron-builder -- --publish always --linux

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: React GraphQL TypeScript Template CD
22
on:
33
push:
4-
branches: [qa]
4+
branches: [random]
55
jobs:
66
build-and-deploy:
77
runs-on: ubuntu-latest

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: React Template CI
22
on:
33
pull_request:
4-
branches: [qa]
4+
branches: [master, staging, dev]
55
jobs:
66
build-and-test:
77
name: Build & Test

package.json

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "react-graphql-ts-template",
3-
"version": "1.0.3",
3+
"version": "1.0.7-alpha.1",
44
"description": "A React Typescript GraphQL application",
55
"repository": {
66
"type": "git",
7-
"url": "git://github.com/wednesday-solutions/react-graphql-ts-template.git"
7+
"url": "git@github.com:wednesday-solutions/electron-react-ts-template.git"
88
},
99
"engines": {
1010
"npm": ">=5",
@@ -67,6 +67,7 @@
6767
"IE 10"
6868
],
6969
"build": {
70+
"appId": "electron-react-ts-template",
7071
"directories": {
7172
"buildResources": "build"
7273
},
@@ -76,7 +77,52 @@
7677
"package.json",
7778
"main/main.js"
7879
],
79-
"extends": null
80+
"extends": null,
81+
"publish": {
82+
"provider": "github",
83+
"owner": "wednesday-solutions",
84+
"repo": "electron-react-ts-template",
85+
"private": "true"
86+
},
87+
"mac": {
88+
"target": {
89+
"target": "default",
90+
"arch": [
91+
"arm64",
92+
"x64"
93+
]
94+
},
95+
"type": "distribution",
96+
"hardenedRuntime": true,
97+
"entitlements": "assets/entitlements.mac.plist",
98+
"entitlementsInherit": "assets/entitlements.mac.plist",
99+
"gatekeeperAssess": false
100+
},
101+
"dmg": {
102+
"contents": [
103+
{
104+
"x": 130,
105+
"y": 220
106+
},
107+
{
108+
"x": 410,
109+
"y": 220,
110+
"type": "link",
111+
"path": "/Applications"
112+
}
113+
]
114+
},
115+
"win": {
116+
"target": [
117+
"nsis"
118+
]
119+
},
120+
"linux": {
121+
"target": [
122+
"AppImage"
123+
],
124+
"category": "Development"
125+
}
80126
},
81127
"lint-staged": {
82128
"*.{js,ts,jsx,tsx}": [

0 commit comments

Comments
 (0)