Skip to content

Commit a2e5b2e

Browse files
authored
Merge branch 'main' into release/v5.18.0
2 parents df20576 + 5dcfd57 commit a2e5b2e

File tree

7 files changed

+115
-96
lines changed

7 files changed

+115
-96
lines changed

.github/workflows/build.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Build
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build-macos:
8+
name: Build macOS (electron-builder)
9+
runs-on: macos-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: pnpm/action-setup@v3
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version-file: '.nvmrc'
17+
cache: 'pnpm'
18+
- run: pnpm install
19+
- run: pnpm build
20+
- run: pnpm prepare:remove-source-maps
21+
- run: pnpm package:macos --publish=never -c.mac.identity=null
22+
env:
23+
CSC_LINK: ${{ secrets.mac_certs }}
24+
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }}
25+
- name: Clean up builds
26+
run: rm -rfv dist/mac-universal
27+
- uses: actions/upload-artifact@v4
28+
with:
29+
name: Gitify-dist-mac
30+
path: dist/
31+
overwrite: true
32+
33+
build-windows:
34+
name: Build Windows (electron-builder)
35+
runs-on: windows-latest
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
- uses: pnpm/action-setup@v3
40+
- uses: actions/setup-node@v4
41+
with:
42+
node-version-file: '.nvmrc'
43+
cache: 'pnpm'
44+
- run: pnpm install
45+
- run: pnpm build
46+
- run: pnpm prepare:remove-source-maps
47+
- run: pnpm package:win --publish=never
48+
- name: Clean up builds
49+
run: Remove-Item dist/win-unpacked -Recurse
50+
- uses: actions/upload-artifact@v4
51+
with:
52+
name: Gitify-dist-win
53+
path: dist
54+
overwrite: true
55+
56+
build-linux:
57+
name: Build Linux (electron-builder)
58+
runs-on: ubuntu-latest
59+
60+
steps:
61+
- uses: actions/checkout@v4
62+
- uses: pnpm/action-setup@v3
63+
- uses: actions/setup-node@v4
64+
with:
65+
node-version-file: '.nvmrc'
66+
cache: 'pnpm'
67+
- run: pnpm install
68+
- run: pnpm build
69+
- run: pnpm prepare:remove-source-maps
70+
- run: pnpm package:linux --publish=never
71+
- name: Clean up builds
72+
run: rm -rfv dist/linux-unpacked
73+
- uses: actions/upload-artifact@v4
74+
with:
75+
name: Gitify-dist-linux
76+
path: dist
77+
overwrite: true

.github/workflows/ci.yml

Lines changed: 10 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -12,88 +12,24 @@ jobs:
1212
lint:
1313
name: Lint App
1414
uses: ./.github/workflows/lint.yml
15-
if: ${{ !startsWith(github.head_ref, 'release/v') }}
1615

1716
tests:
1817
name: Tests
1918
uses: ./.github/workflows/test.yml
2019
needs: lint
21-
if: ${{ !startsWith(github.head_ref, 'release/v') }}
22-
23-
build-macos:
24-
name: Build macOS (electron-builder)
25-
runs-on: macos-latest
26-
needs: tests
27-
if: ${{ !startsWith(github.head_ref, 'release/v') }}
28-
29-
steps:
30-
- uses: actions/checkout@v4
31-
- uses: pnpm/action-setup@v3
32-
- uses: actions/setup-node@v4
33-
with:
34-
node-version-file: '.nvmrc'
35-
cache: 'pnpm'
36-
- run: pnpm install
37-
- run: pnpm build
38-
- run: pnpm prepare:remove-source-maps
39-
- run: pnpm package:macos --publish=never -c.mac.identity=null
40-
env:
41-
CSC_LINK: ${{ secrets.mac_certs }}
42-
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }}
43-
- name: Clean up builds
44-
run: rm -rfv dist/mac-universal
45-
- uses: actions/upload-artifact@v4
46-
with:
47-
name: Gitify-dist-mac
48-
path: dist/
49-
overwrite: true
5020

51-
build-windows:
52-
name: Build Windows (electron-builder)
53-
runs-on: windows-latest
21+
build:
22+
name: Build
23+
uses: ./.github/workflows/build.yml
5424
needs: tests
5525
if: ${{ !startsWith(github.head_ref, 'release/v') }}
5626

57-
steps:
58-
- uses: actions/checkout@v4
59-
- uses: pnpm/action-setup@v3
60-
- uses: actions/setup-node@v4
61-
with:
62-
node-version-file: '.nvmrc'
63-
cache: 'pnpm'
64-
- run: pnpm install
65-
- run: pnpm build
66-
- run: pnpm prepare:remove-source-maps
67-
- run: pnpm package:win --publish=never
68-
- name: Clean up builds
69-
run: Remove-Item dist/win-unpacked -Recurse
70-
- uses: actions/upload-artifact@v4
71-
with:
72-
name: Gitify-dist-win
73-
path: dist
74-
overwrite: true
75-
76-
build-linux:
77-
name: Build Linux (electron-builder)
78-
runs-on: ubuntu-latest
27+
release:
28+
name: Release
29+
uses: ./.github/workflows/release.yml
7930
needs: tests
80-
if: ${{ !startsWith(github.head_ref, 'release/v') }}
31+
if: ${{ startsWith(github.head_ref, 'release/v') }}
32+
permissions:
33+
contents: write
8134

82-
steps:
83-
- uses: actions/checkout@v4
84-
- uses: pnpm/action-setup@v3
85-
- uses: actions/setup-node@v4
86-
with:
87-
node-version-file: '.nvmrc'
88-
cache: 'pnpm'
89-
- run: pnpm install
90-
- run: pnpm build
91-
- run: pnpm prepare:remove-source-maps
92-
- run: pnpm package:linux --publish=never
93-
- name: Clean up builds
94-
run: rm -rfv dist/linux-unpacked
95-
- uses: actions/upload-artifact@v4
96-
with:
97-
name: Gitify-dist-linux
98-
path: dist
99-
overwrite: true
35+

.github/workflows/release.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,16 @@
11
name: Release
22

3-
on:
4-
push:
5-
branches:
6-
- 'release/v**'
7-
workflow_dispatch: # For manually running release process to verify codesigning of artifacts
3+
on:
4+
workflow_call:
5+
workflow_dispatch: # For manually running release process to verify code-signing of artifacts
86

97
permissions:
108
contents: write
119

1210
jobs:
13-
lint:
14-
name: Lint App
15-
uses: ./.github/workflows/lint.yml
16-
17-
tests:
18-
name: Tests
19-
uses: ./.github/workflows/test.yml
20-
needs: lint
21-
2211
release-macos:
2312
name: Publish macOS (electron-builder)
2413
runs-on: macos-latest
25-
needs: tests
2614

2715
steps:
2816
- uses: actions/checkout@v4
@@ -55,7 +43,6 @@ jobs:
5543
release-windows:
5644
name: Publish Windows (electron-builder)
5745
runs-on: windows-latest
58-
needs: tests
5946

6047
steps:
6148
- uses: actions/checkout@v4
@@ -82,7 +69,6 @@ jobs:
8269
release-linux:
8370
name: Publish Linux (electron-builder)
8471
runs-on: ubuntu-latest
85-
needs: tests
8672

8773
steps:
8874
- uses: actions/checkout@v4

.github/workflows/triage.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@ name: Triage PR
22

33
on:
44
pull_request:
5-
types: [opened, edited, synchronize, ready_for_review]
6-
branches: [main]
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
- ready_for_review
10+
branches:
11+
- main
712

813
permissions:
914
contents: read # the config file

.github/workflows/website.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Update Website
1+
name: Website
22

33
on:
44
push:
@@ -7,8 +7,8 @@ on:
77

88
jobs:
99
redeploy-website:
10+
name: Deploy Website
1011
runs-on: ubuntu-latest
1112
steps:
12-
- name: Redeploy Website
13-
run: curl -X POST -d {} ${{ secrets.NETLIFY_BUILD_HOOK_URL }}
13+
- run: curl -X POST -d {} ${{ secrets.NETLIFY_BUILD_HOOK_URL }}
1414

src/renderer/utils/subject.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,20 @@ describe('renderer/utils/subject.ts', () => {
7070
});
7171
});
7272

73+
it('failed at startup check suite state', async () => {
74+
const mockNotification = partialMockNotification({
75+
title: 'Demo workflow run failed at startup for main branch',
76+
type: 'CheckSuite',
77+
});
78+
79+
const result = await getGitifySubjectDetails(mockNotification);
80+
81+
expect(result).toEqual({
82+
state: 'failure',
83+
user: null,
84+
});
85+
});
86+
7387
it('multiple attempts failed check suite state', async () => {
7488
const mockNotification = partialMockNotification({
7589
title: 'Demo workflow run, Attempt #3 failed for main branch',

src/renderer/utils/subject.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ function getCheckSuiteStatus(statusDisplayName: string): CheckSuiteStatus {
9292
case 'cancelled':
9393
return 'cancelled';
9494
case 'failed':
95+
case 'failed at startup':
9596
return 'failure';
9697
case 'skipped':
9798
return 'skipped';

0 commit comments

Comments
 (0)