Skip to content

Commit

Permalink
fix: add updater (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelkristiansson authored Sep 3, 2024
1 parent d2f5e11 commit ea72c4a
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 63 deletions.
60 changes: 34 additions & 26 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: "Publish"
name: 'Publish'
on:
push:
branches:
- main

env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}

jobs:
publish-tauri:
strategy:
Expand All @@ -13,28 +17,32 @@ jobs:

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: setup node
uses: actions/setup-node@v1
with:
node-version: 16
- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- name: install app dependencies and build it
run: yarn && yarn tauri:build
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: gitbar-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: Gitbar v__VERSION__
releaseBody: ""
releaseDraft: true
prerelease: false
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: install Rust stable
uses: actions-rs/toolchain@stable
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- name: install app dependencies and build it
run: yarn && yarn tauri:build
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with:
tagName: gitbar-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: Gitbar v__VERSION__
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}
46 changes: 26 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: "test-on-pr"
name: 'test-on-pr'
on: [pull_request]

env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}

jobs:
test-tauri:
strategy:
Expand All @@ -10,22 +14,24 @@ jobs:

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: setup node
uses: actions/setup-node@v1
with:
node-version: 16
- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- name: install app dependencies and build it
run: yarn && yarn tauri:build
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- name: setup node
uses: actions/setup-node@v1
with:
node-version: 16
- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- name: install app dependencies and build it
run: yarn && yarn tauri:build
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gitbar",
"private": true,
"version": "0.4.2",
"version": "0.4.3",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down Expand Up @@ -29,11 +29,11 @@
"vite": "^3.0.9"
},
"prettier": {
"tabWidth": 4,
"tabWidth": 2,
"trailingComma": "es5",
"semi": true,
"singleQuote": true,
"printWidth": 120,
"arrowParens": "avoid"
}
}
}
2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gitbar"
version = "0.4.2"
version = "0.4.3"
description = "Github review counter"
authors = ["mikael.kristiansson"]
license = "MIT"
Expand Down
21 changes: 8 additions & 13 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@
},
"package": {
"productName": "GitBar",
"version": "0.4.2"
"version": "0.4.3"
},
"tauri": {
"allowlist": {
"http": {
"request": true,
"scope": [
"https://**"
]
"scope": ["https://**"]
},
"notification": {
"all": true
Expand All @@ -33,13 +31,7 @@
"depends": []
},
"externalBin": [],
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/[email protected]",
"icons/icon.icns",
"icons/icon.ico"
],
"icon": ["icons/32x32.png", "icons/128x128.png", "icons/[email protected]", "icons/icon.icns", "icons/icon.ico"],
"identifier": "com.gitbar.dev",
"longDescription": "Github reviews in your system taskbar",
"macOS": {
Expand All @@ -62,7 +54,10 @@
"csp": null
},
"updater": {
"active": false
"active": true,
"endpoints": ["https://gitbar-update-server.vercel.app/update/{{target}}/{{current_version}}"],
"dialog": true,
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEYxMTYzNDYzNzU1QzYxQkIKUldTN1lWeDFZelFXOFJBZlp3OFZYWFZvK2c3RU5xSGZwVE45ciswWGpwRUdTRXBJbzFnMmRZZlgK"
},
"systemTray": {
"iconPath": "icons/tray.png",
Expand All @@ -83,4 +78,4 @@
}
]
}
}
}

0 comments on commit ea72c4a

Please sign in to comment.