Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@ on:
branches:
- main
pull_request:
branches-ignore:
- release/v*.*.* # macOS code-signing only works on `push` events, not `pull_request` events
branches:
- main

jobs:
prepare: # macOS code-signing only works on `push` events and not `pull_request` events
if: ${{ !startsWith(github.head_ref, 'release/v') }}
name: Prepare CI
runs-on: ubuntu-latest
steps:
- run: echo Running CI for branch ${{ github.head_ref }}

lint:
name: Lint App
uses: ./.github/workflows/lint.yml
needs: prepare

tests:
name: Tests
Expand All @@ -22,14 +30,4 @@ jobs:
name: Build
uses: ./.github/workflows/build.yml
needs: tests
if: ${{ !startsWith(github.head_ref, 'release/v') }}

release:
name: Release
uses: ./.github/workflows/release.yml
needs: tests
if: ${{ startsWith(github.head_ref, 'release/v') }}
permissions:
contents: write


secrets: inherit
93 changes: 93 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Publish

on:
workflow_call:
workflow_dispatch: # For manually running release process to verify code-signing of artifacts

permissions:
contents: write

jobs:
release-macos:
name: Publish macOS (electron-builder)
runs-on: macos-latest

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install
- run: pnpm build
env:
OAUTH_CLIENT_ID: ${{ secrets.oauth_client_id }}
OAUTH_CLIENT_SECRET: ${{ secrets.oauth_client_secret }}
- run: pnpm prepare:remove-source-maps
- run: pnpm package:macos --publish onTagOrDraft
env:
APPLEID_USERNAME: ${{ secrets.appleid_username }}
APPLEID_PASSWORD: ${{ secrets.appleid_password }}
APPLEID_TEAM_ID: ${{ secrets.appleid_teamid }}
CSC_LINK: ${{ secrets.mac_certs }}
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }}
GH_TOKEN: ${{ secrets.github_token }}
NOTARIZE: true
- uses: actions/upload-artifact@v4
with:
name: Gitify-release-mac
path: dist/
overwrite: true

release-windows:
name: Publish Windows (electron-builder)
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install
- run: pnpm build
env:
OAUTH_CLIENT_ID: ${{ secrets.oauth_client_id }}
OAUTH_CLIENT_SECRET: ${{ secrets.oauth_client_secret }}
- run: pnpm prepare:remove-source-maps
- run: pnpm package:win --publish onTagOrDraft
env:
GH_TOKEN: ${{ secrets.github_token }}
- uses: actions/upload-artifact@v4
with:
name: Gitify-release-win
path: dist/
overwrite: true

release-linux:
name: Publish Linux (electron-builder)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install
- run: pnpm build
env:
OAUTH_CLIENT_ID: ${{ secrets.oauth_client_id }}
OAUTH_CLIENT_SECRET: ${{ secrets.oauth_client_secret }}
- run: pnpm prepare:remove-source-maps
- run: pnpm package:linux --publish onTagOrDraft
env:
GH_TOKEN: ${{ secrets.github_token }}
- uses: actions/upload-artifact@v4
with:
name: Gitify-release-linux
path: dist/
overwrite: true
109 changes: 20 additions & 89 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,93 +1,24 @@
name: Release

on:
workflow_call:
workflow_dispatch: # For manually running release process to verify code-signing of artifacts

permissions:
contents: write
on:
push:
branches:
- release/v*.*.* # macOS code-signing only works on `push` events and not `pull_request` events

jobs:
release-macos:
name: Publish macOS (electron-builder)
runs-on: macos-latest

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install
- run: pnpm build
env:
OAUTH_CLIENT_ID: ${{ secrets.oauth_client_id }}
OAUTH_CLIENT_SECRET: ${{ secrets.oauth_client_secret }}
- run: pnpm prepare:remove-source-maps
- run: pnpm package:macos --publish onTagOrDraft
env:
APPLEID_USERNAME: ${{ secrets.appleid_username }}
APPLEID_PASSWORD: ${{ secrets.appleid_password }}
APPLEID_TEAM_ID: ${{ secrets.appleid_teamid }}
CSC_LINK: ${{ secrets.mac_certs }}
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }}
GH_TOKEN: ${{ secrets.github_token }}
NOTARIZE: true
- uses: actions/upload-artifact@v4
with:
name: Gitify-release-mac
path: dist/
overwrite: true

release-windows:
name: Publish Windows (electron-builder)
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install
- run: pnpm build
env:
OAUTH_CLIENT_ID: ${{ secrets.oauth_client_id }}
OAUTH_CLIENT_SECRET: ${{ secrets.oauth_client_secret }}
- run: pnpm prepare:remove-source-maps
- run: pnpm package:win --publish onTagOrDraft
env:
GH_TOKEN: ${{ secrets.github_token }}
- uses: actions/upload-artifact@v4
with:
name: Gitify-release-win
path: dist/
overwrite: true

release-linux:
name: Publish Linux (electron-builder)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install
- run: pnpm build
env:
OAUTH_CLIENT_ID: ${{ secrets.oauth_client_id }}
OAUTH_CLIENT_SECRET: ${{ secrets.oauth_client_secret }}
- run: pnpm prepare:remove-source-maps
- run: pnpm package:linux --publish onTagOrDraft
env:
GH_TOKEN: ${{ secrets.github_token }}
- uses: actions/upload-artifact@v4
with:
name: Gitify-release-linux
path: dist/
overwrite: true
lint:
name: Lint App
uses: ./.github/workflows/lint.yml

tests:
name: Tests
uses: ./.github/workflows/test.yml
needs: lint

release:
name: Publish
uses: ./.github/workflows/publish.yml
needs: tests
secrets: inherit
permissions:
contents: write
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gitify",
"version": "5.17.0",
"version": "5.18.0",
"description": "GitHub notifications on your menu bar.",
"main": "build/main.js",
"scripts": {
Expand Down
Loading