Skip to content

Commit

Permalink
chore: add release action (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelkristiansson authored Nov 17, 2022
1 parent b7c6462 commit 592339f
Show file tree
Hide file tree
Showing 11 changed files with 79 additions and 34 deletions.
1 change: 1 addition & 0 deletions .github/funding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [mikaelkristiansson]
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "publish"
on:
push:
branches:
- main

jobs:
publish-tauri:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]

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: "See the assets to download this version and install."
releaseDraft: true
prerelease: false
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "test-on-pr"
on: [pull_request]

jobs:
test-tauri:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]

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 }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Gitbar

![image](./docs/app.png)

## Requirements:

[here](https://tauri.app/v1/guides/getting-started/prerequisites)
Expand Down
Binary file added docs/app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/icons/notification.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ rust-version = "1.57"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[build-dependencies]
tauri-build = { version = "1.1", features = [] }
tauri-build = { version = "1.2", features = [] }

[dependencies]
serde_json = "1.0"
Expand Down
7 changes: 3 additions & 4 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ impl<R: Runtime> WindowExt for Window<R> {
fn set_review_count(app_handle: tauri::AppHandle, count: &str) {
let mut rev_count = count.to_string();
rev_count.insert_str(0, " ");
#[cfg(target_os = "macos")]
app_handle
.tray_handle()
.set_title(&rev_count)
Expand Down Expand Up @@ -140,9 +141,7 @@ fn main() {
}
_ => {}
})
.invoke_handler(tauri::generate_handler![
set_review_count
])
.invoke_handler(tauri::generate_handler![set_review_count])
.plugin(auto_start::init(
MacosLauncher::LaunchAgent,
None,
Expand All @@ -153,7 +152,7 @@ fn main() {
app.set_activation_policy(tauri::ActivationPolicy::Accessory);

let window = app.get_window("main").unwrap();

#[cfg(target_os = "macos")]
window.set_transparent_titlebar(true, true);

// this is a workaround for the window to always show in current workspace.
Expand Down
16 changes: 1 addition & 15 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,7 @@
module.exports = {
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {
colors: {
gray: {
sidebar: '#24292e',
dark: '#161b22',
darker: '#090E15',
darkest: '#000209',
},
primary: '#203354',
success: '#2CC966',
info: '#8BA9C6',
warning: '#FCAA67',
danger: '#B7524F',
},
},
extend: {},
},
plugins: [],
};
14 changes: 0 additions & 14 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,5 @@ export default defineConfig({
plugins: [react()],
server: {
port: 3000,
// proxy: {
// '/api': {
// target: 'https://api.github.com',
// changeOrigin: true,
// secure: false,
// rewrite: (path) => path.replace(/^\/api/, ''),
// },
// // '/api/enterprise': {
// // target: 'https://api.github.schibsted.io',
// // changeOrigin: true,
// // secure: false,
// // rewrite: (path) => path.replace(/^\/api\/enterprise/, ''),
// // },
// },
},
});

0 comments on commit 592339f

Please sign in to comment.