Skip to content

Commit 8efb114

Browse files
committed
Merge branch 'main' into copilot/fix-823
2 parents 239b6a4 + 826fa32 commit 8efb114

22 files changed

Lines changed: 245 additions & 296 deletions
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This is the composite action:
2+
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
3+
4+
name: Setup Node, pnpm and install dependencies
5+
description: Setup pnpm and Node.js with caching
6+
7+
runs:
8+
using: composite
9+
steps:
10+
- name: Setup pnpm
11+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
12+
13+
- name: Setup Node
14+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
15+
with:
16+
node-version-file: .nvmrc
17+
cache: pnpm
18+
19+
- name: Install dependencies
20+
run: pnpm install --frozen-lockfile
21+
shell: bash

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Gitify is a Node.js/Electron desktop application that displays GitHub notificati
4242
- NOTE: Some existing snapshot tests may fail but still return success - this is normal
4343
- Update snapshots after legitimate UI changes with `pnpm test -u`
4444
- **Run tests with coverage** (CI format):
45-
- `pnpm test --coverage --runInBand --verbose`
45+
- `pnpm test --verbose`
4646

4747
## Validation Scenarios
4848

.github/workflows/build.yml

Lines changed: 35 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -7,98 +7,52 @@ permissions:
77
contents: read
88

99
jobs:
10-
build-macos:
11-
name: Build macOS (electron-builder)
12-
runs-on: macos-latest
10+
build:
11+
name: Build ${{ matrix.platform }} (electron-builder)
12+
strategy:
13+
matrix:
14+
include:
15+
- os: macos-latest
16+
platform: macOS
17+
package-cmd: pnpm package:macos --publish=never -c.mac.identity=null
18+
cleanup-path: dist/mac-universal
19+
artifact-name: Gitify-dist-mac
20+
- os: windows-latest
21+
platform: Windows
22+
package-cmd: pnpm package:win --publish=never
23+
cleanup-path: dist/win-unpacked
24+
artifact-name: Gitify-dist-win
25+
- os: ubuntu-latest
26+
platform: Linux
27+
package-cmd: pnpm package:linux --publish=never
28+
cleanup-path: dist/linux-unpacked
29+
artifact-name: Gitify-dist-linux
30+
runs-on: ${{ matrix.os }}
1331

1432
steps:
1533
- name: Checkout
16-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
34+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1735

18-
- name: Setup pnpm
19-
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
20-
21-
- name: Setup Node
22-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
23-
with:
24-
node-version-file: '.nvmrc'
25-
cache: 'pnpm'
26-
27-
- run: pnpm install
28-
- run: pnpm build
29-
- run: pnpm package:macos --publish=never -c.mac.identity=null
36+
- name: Setup Node.js
37+
uses: ./.github/actions/setup-node
38+
39+
- name: Build application
40+
run: pnpm build
41+
42+
- name: Package for ${{ matrix.platform }}
43+
run: ${{ matrix.package-cmd }}
3044
env:
45+
# For macOS
3146
CSC_LINK: ${{ secrets.CSC_LINK }}
3247
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
33-
34-
- name: Clean up builds
35-
run: rm -rfv dist/mac-universal
36-
37-
- name: Upload artifacts
38-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
39-
with:
40-
name: Gitify-dist-mac
41-
path: dist/
42-
overwrite: true
43-
44-
build-windows:
45-
name: Build Windows (electron-builder)
46-
runs-on: windows-latest
47-
48-
steps:
49-
- name: Checkout
50-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
5148

52-
- name: Setup pnpm
53-
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
54-
55-
- name: Setup Node
56-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
57-
with:
58-
node-version-file: '.nvmrc'
59-
cache: 'pnpm'
60-
61-
- run: pnpm install
62-
- run: pnpm build
63-
- run: pnpm package:win --publish=never
64-
6549
- name: Clean up builds
66-
run: Remove-Item dist/win-unpacked -Recurse
67-
68-
- name: Upload artifacts
69-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
70-
with:
71-
name: Gitify-dist-win
72-
path: dist
73-
overwrite: true
74-
75-
build-linux:
76-
name: Build Linux (electron-builder)
77-
runs-on: ubuntu-latest
50+
shell: bash
51+
run: rm -rfv ${{ matrix.cleanup-path }}
7852

79-
steps:
80-
- name: Checkout
81-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
82-
83-
- name: Setup pnpm
84-
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
85-
86-
- name: Setup Node
87-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
88-
with:
89-
node-version-file: '.nvmrc'
90-
cache: 'pnpm'
91-
92-
- run: pnpm install
93-
- run: pnpm build
94-
- run: pnpm package:linux --publish=never
95-
96-
- name: Clean up builds
97-
run: rm -rfv dist/linux-unpacked
98-
9953
- name: Upload artifacts
10054
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
10155
with:
102-
name: Gitify-dist-linux
103-
path: dist
56+
name: ${{ matrix.artifact-name }}
57+
path: dist/
10458
overwrite: true

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313

1414
jobs:
1515
prepare: # macOS code-signing only works on `push` events and not `pull_request` events
16-
if: ${{ !startsWith(github.head_ref, 'release/v') }}
16+
if: ${{ !startsWith(github.head_ref, 'release/v') }}
1717
name: Prepare CI
1818
runs-on: ubuntu-latest
1919
steps:

.github/workflows/lint.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,10 @@ jobs:
1313

1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
16+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1717

18-
- name: Setup pnpm
19-
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
20-
21-
- name: Setup Node
22-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
23-
with:
24-
node-version-file: '.nvmrc'
25-
cache: 'pnpm'
26-
27-
- run: pnpm install
28-
- run: pnpm lint:check
29-
18+
- name: Setup Node.js
19+
uses: ./.github/actions/setup-node
20+
21+
- name: Run linter
22+
run: pnpm lint:check

.github/workflows/milestone.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
milestone=$(gh api repos/${{ github.repository }}/milestones \
2525
--jq '.[] | select(.state=="open") | .title' | head -n 1)
2626
echo "Found milestone: $milestone"
27-
echo "milestone=$milestone" >> $GITHUB_ENV
27+
echo "milestone=$milestone" >> $GITHUB_OUTPUT
2828
2929
- name: Add milestone to PR
30-
if: env.milestone != ''
30+
if: steps.milestone.outputs.milestone != ''
3131
run: |
3232
gh pr edit ${{ github.event.pull_request.number }} \
3333
--repo ${{ github.repository }} \
34-
--milestone "${{ env.milestone }}"
34+
--milestone "${{ steps.milestone.outputs.milestone }}"

.github/workflows/publish.yml

Lines changed: 35 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,63 @@
11
name: Publish
22

3-
on:
3+
on:
44
workflow_call:
55
workflow_dispatch: # For manually running release process to verify code-signing of artifacts
66

77
permissions:
88
contents: write
99

1010
jobs:
11-
release-macos:
12-
name: Publish macOS (electron-builder)
13-
runs-on: macos-latest
11+
release:
12+
name: Publish ${{ matrix.platform }} (electron-builder)
13+
strategy:
14+
matrix:
15+
include:
16+
- os: macos-latest
17+
platform: macOS
18+
package-cmd: pnpm package:macos --publish onTagOrDraft
19+
artifact-name: Gitify-release-mac
20+
use-apple-notarization: true
21+
- os: windows-latest
22+
platform: Windows
23+
package-cmd: pnpm package:win --publish onTagOrDraft
24+
artifact-name: Gitify-release-win
25+
use-apple-notarization: false
26+
- os: ubuntu-latest
27+
platform: Linux
28+
package-cmd: pnpm package:linux --publish onTagOrDraft
29+
artifact-name: Gitify-release-linux
30+
use-apple-notarization: false
31+
runs-on: ${{ matrix.os }}
1432

1533
steps:
1634
- name: Checkout
17-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
35+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1836

19-
- name: Setup pnpm
20-
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
21-
22-
- name: Setup Node
23-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
24-
with:
25-
node-version-file: '.nvmrc'
26-
cache: 'pnpm'
27-
28-
- run: pnpm install
29-
- run: pnpm build
37+
- name: Setup Node.js
38+
uses: ./.github/actions/setup-node
39+
40+
- name: Build application
41+
run: pnpm build
3042
env:
3143
OAUTH_CLIENT_ID: ${{ secrets.OAUTH_CLIENT_ID }}
3244
OAUTH_CLIENT_SECRET: ${{ secrets.OAUTH_CLIENT_SECRET }}
33-
- run: pnpm package:macos --publish onTagOrDraft
45+
46+
- name: Package and publish for ${{ matrix.platform }}
47+
run: ${{ matrix.package-cmd }}
3448
env:
49+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
# For macOS
3551
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
3652
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
3753
APPLE_ID_TEAM_ID: ${{ secrets.APPLE_ID_TEAM_ID }}
3854
CSC_LINK: ${{ secrets.CSC_LINK }}
3955
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
40-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
NOTARIZE: true
42-
43-
- name: Upload artifacts
44-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
45-
with:
46-
name: Gitify-release-mac
47-
path: dist/
48-
overwrite: true
49-
50-
release-windows:
51-
name: Publish Windows (electron-builder)
52-
runs-on: windows-latest
53-
54-
steps:
55-
- name: Checkout
56-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
56+
NOTARIZE: ${{ matrix.use-apple-notarization }}
5757

58-
- name: Setup pnpm
59-
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
60-
61-
- name: Setup Node
62-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
63-
with:
64-
node-version-file: '.nvmrc'
65-
cache: 'pnpm'
66-
67-
- run: pnpm install
68-
- run: pnpm build
69-
env:
70-
OAUTH_CLIENT_ID: ${{ secrets.OAUTH_CLIENT_ID }}
71-
OAUTH_CLIENT_SECRET: ${{ secrets.OAUTH_CLIENT_SECRET }}
72-
- run: pnpm package:win --publish onTagOrDraft
73-
env:
74-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75-
7658
- name: Upload artifacts
7759
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
7860
with:
79-
name: Gitify-release-win
61+
name: ${{ matrix.artifact-name }}
8062
path: dist/
8163
overwrite: true
82-
83-
release-linux:
84-
name: Publish Linux (electron-builder)
85-
runs-on: ubuntu-latest
86-
87-
steps:
88-
- name: Checkout
89-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
90-
91-
- name: Setup pnpm
92-
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
93-
94-
- name: Setup Node
95-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
96-
with:
97-
node-version-file: '.nvmrc'
98-
cache: 'pnpm'
99-
100-
- run: pnpm install
101-
- run: pnpm build
102-
env:
103-
OAUTH_CLIENT_ID: ${{ secrets.OAUTH_CLIENT_ID }}
104-
OAUTH_CLIENT_SECRET: ${{ secrets.OAUTH_CLIENT_SECRET }}
105-
- run: pnpm package:linux --publish onTagOrDraft
106-
env:
107-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108-
109-
- name: Upload artifacts
110-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
111-
with:
112-
name: Gitify-release-linux
113-
path: dist/
114-
overwrite: true

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ jobs:
2424
uses: ./.github/workflows/publish.yml
2525
needs: tests
2626
secrets: inherit
27-
permissions:
28-
contents: write
27+
permissions:
28+
contents: write

.github/workflows/renovate.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
22+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2323

2424
- name: Setup pnpm
2525
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
@@ -30,8 +30,10 @@ jobs:
3030
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
3131
with:
3232
node-version-file: .nvmrc
33-
34-
- run: pnpm install --global renovate
35-
33+
cache: pnpm
34+
35+
- name: Install Renovate
36+
run: pnpm install --global renovate
37+
3638
- name: Validate Renovate config
3739
run: renovate-config-validator

0 commit comments

Comments
 (0)