Skip to content

Commit 7be3043

Browse files
committed
Add support for tauri app
0 parents  commit 7be3043

33 files changed

+5402
-0
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
open_collective: cinny
2+
liberapay: ajbura

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!-- Please read https://github.com/ajbura/cinny/CONTRIBUTING.md before submitting your pull request -->
2+
3+
### Description
4+
<!-- Please include a summary of the change. Please also include relevant motivation and context. List any dependencies that are required for this change. -->
5+
6+
7+
Fixes #
8+
9+
#### Type of change
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] This change requires a documentation update
15+
16+
### Checklist:
17+
18+
- [ ] My code follows the style guidelines of this project
19+
- [ ] I have performed a self-review of my own code
20+
- [ ] I have commented my code, particularly in hard-to-understand areas
21+
- [ ] I have made corresponding changes to the documentation
22+
- [ ] My changes generate no new warnings

.github/SECURITY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Reporting a Vulnerability
2+
3+
**If you've found a security vulnerability, please report it to [email protected]**

.github/dependabot.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Docs: <https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/customizing-dependency-updates>
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: npm
6+
directory: /
7+
schedule:
8+
interval: weekly
9+
day: "tuesday"
10+
time: "01:00"
11+
timezone: "Asia/Kolkata"
12+
open-pull-requests-limit: 15
13+
14+
- package-ecosystem: github-actions
15+
directory: /
16+
schedule:
17+
interval: weekly
18+
day: "tuesday"
19+
time: "01:00"
20+
timezone: "Asia/Kolkata"
21+
open-pull-requests-limit: 5
22+
23+
- package-ecosystem: cargo
24+
directory: /src-tauri/
25+
schedule:
26+
interval: weekly
27+
day: "tuesday"
28+
time: "01:00"
29+
timezone: "Asia/Kolkata"
30+
open-pull-requests-limit: 5

.github/workflows/tauri.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: "Publish Tauri App"
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
publish-tauri:
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
platform: [macos-latest, ubuntu-latest, windows-latest]
12+
13+
runs-on: ${{ matrix.platform }}
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/[email protected]
17+
with:
18+
submodules: true
19+
- name: Get release
20+
id: get_release
21+
uses: bruceadams/get-release@3a8733307b85cd96d52772b037617bd63d99522e
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
- name: Setup node
25+
uses: actions/[email protected]
26+
with:
27+
node-version: 16
28+
- name: Install Rust stable
29+
uses: actions-rs/[email protected]
30+
with:
31+
toolchain: stable
32+
- name: Install webkit2gtk (ubuntu only)
33+
if: matrix.platform == 'ubuntu-latest'
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install -y webkit2gtk-4.0
37+
- name: Install cinny dependencies
38+
run: cd cinny && npm ci
39+
- name: Install tauri dependencies
40+
run: npm ci
41+
- name: Build desktop app with Tauri
42+
uses: tauri-apps/[email protected]
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
46+
with:
47+
releaseId: ${{ steps.get_release.outputs.upload_url }}
48+
- name: Get app version (macos, ubuntu)
49+
if: matrix.platform != 'windows-latest'
50+
id: vars
51+
run: echo ::set-output name=tag::$(jq .package.version src-tauri/tauri.conf.json | tr -d '"')
52+
- name: Upload tagged release (macos)
53+
if: matrix.platform == 'macos-latest'
54+
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
55+
with:
56+
files: |
57+
src-tauri/target/release/bundle/dmg/cinny_${{ steps.vars.outputs.tag }}_x64.dmg
58+
src-tauri/target/release/bundle/macos/cinny.app.tar.gz
59+
src-tauri/target/release/bundle/macos/cinny.app.tar.gz.sig
60+
- name: Upload tagged release (ubuntu)
61+
if: matrix.platform == 'ubuntu-latest'
62+
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
63+
with:
64+
files: |
65+
src-tauri/target/release/bundle/deb/cinny_${{ steps.vars.outputs.tag }}_amd64.deb
66+
src-tauri/target/release/bundle/appimage/cinny_${{ steps.vars.outputs.tag }}_amd64.AppImage
67+
src-tauri/target/release/bundle/appimage/cinny_${{ steps.vars.outputs.tag }}_amd64.AppImage.tar.gz
68+
src-tauri/target/release/bundle/appimage/cinny_${{ steps.vars.outputs.tag }}_amd64.AppImage.tar.gz.sig
69+
- name: Get app version (windows)
70+
if: matrix.platform == 'windows-latest'
71+
run: |
72+
$json = (Get-Content "src-tauri\tauri.conf.json" -Raw) | ConvertFrom-Json
73+
$version = $json.package.version
74+
echo "Version: ${version}"
75+
echo "TAURI_VERSION=${version}" >> $Env:GITHUB_ENV
76+
echo "${Env:TAURI_VERSION}"
77+
shell: pwsh
78+
- name: Upload tagged release (windows)
79+
if: matrix.platform == 'windows-latest'
80+
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
81+
with:
82+
files: |
83+
src-tauri\target\release\bundle\msi\cinny_${{ env.TAURI_VERSION }}_x64_en-US.msi
84+
src-tauri\target\release\bundle\msi\cinny_${{ env.TAURI_VERSION }}_x64_en-US.msi.zip
85+
src-tauri\target\release\bundle\msi\cinny_${{ env.TAURI_VERSION }}_x64_en-US.msi.zip.sig
86+
87+
release-update:
88+
needs: publish-tauri
89+
runs-on: ubuntu-latest
90+
steps:
91+
- name: Checkout repository
92+
uses: actions/[email protected]
93+
- name: Install dependencies
94+
run: npm ci
95+
- name: Run release.json
96+
run: npm run release
97+
env:
98+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
experiment
2+
dist
3+
node_modules
4+
devAssets
5+
6+
.DS_Store

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "cinny"]
2+
path = cinny
3+
url = https://github.com/ajbura/cinny

cinny

Submodule cinny added at 416fd02

0 commit comments

Comments
 (0)