-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0c32b04
Showing
129 changed files
with
15,327 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react-hooks/recommended", | ||
"prettier", | ||
"plugin:prettier/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": 12, | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"react", | ||
"@typescript-eslint", | ||
"prettier" | ||
], | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"react/react-in-jsx-scope": "off" | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: [main, dev, release] | ||
push: | ||
branches: [main, dev, release] | ||
|
||
jobs: | ||
lint-and-format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18" | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install libgtk-3-dev | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
libgtk-3-dev \ | ||
libsoup2.4-dev \ | ||
libwebkit2gtk-4.0-dev \ | ||
libappindicator3-dev \ | ||
librsvg2-dev | ||
- name: Run ESLint | ||
run: npm run lint | ||
- name: Check Prettier formatting | ||
run: npm run format:check | ||
- name: Check Rust formatting | ||
run: npm run tauri:format:check | ||
- name: Run Rust Clippy | ||
run: mkdir dist && npm run tauri:lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: "dev-release" | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev-release | ||
|
||
# This workflow will trigger on each push to the `release` branch to create or update a GitHub release, build your app, and upload the artifacts to the release. | ||
|
||
jobs: | ||
publish-tauri: | ||
permissions: | ||
contents: write | ||
actions: read | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- platform: "macos-latest" # for Arm based macs (M1 and above). | ||
args: "--target aarch64-apple-darwin" | ||
- platform: "macos-latest" # for Intel based macs. | ||
args: "--target x86_64-apple-darwin" | ||
- platform: "ubuntu-20.04" | ||
args: "" | ||
- platform: "windows-latest" | ||
args: "" | ||
|
||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: install Rust stable | ||
uses: dtolnay/rust-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' # This must match the platform value defined above. | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | ||
- name: import windows certificate | ||
if: matrix.platform == 'windows-latest' | ||
env: | ||
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }} | ||
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} | ||
run: | | ||
New-Item -ItemType directory -Path certificate | ||
Set-Content -Path certificate/tempCert.txt -Value $env:WINDOWS_CERTIFICATE | ||
certutil -decode certificate/tempCert.txt certificate/certificate.pfx | ||
Remove-Item -path certificate -include tempCert.txt | ||
Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText) | ||
- name: install frontend dependencies | ||
run: npm install | ||
|
||
- name: update app icon | ||
run: npm run tauri icon app-icons/dev-icon.png | ||
|
||
- uses: tauri-apps/tauri-action@v0 | ||
id: tauri-build | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | ||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | ||
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | ||
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | ||
with: | ||
tagName: keeper-desktop-v__VERSION__-dev # the action automatically replaces \_\_VERSION\_\_ with the app version. | ||
releaseName: "Keeper Desktop v__VERSION__ (dev)" | ||
releaseBody: "This is a development version of Keeper Desktop. It is not meant for production use." | ||
releaseDraft: true | ||
prerelease: false | ||
args: ${{ matrix.args }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: PGP sign release | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["release", "dev-release"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
sign-release: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install GPG | ||
run: sudo apt-get install -y gnupg | ||
|
||
- name: Import GPG key | ||
env: | ||
PGP_PRIVATE_KEY: ${{ secrets.PGP_PRIVATE_KEY }} | ||
PGP_PASSWORD: ${{ secrets.PGP_PASSWORD }} | ||
run: | | ||
echo "$PGP_PRIVATE_KEY" | gpg --batch --yes --import | ||
echo "$PGP_PASSWORD" | gpg --batch --yes --passphrase-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/ { print $5 }') | ||
- name: Create and Sign SHA256SUMS | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PGP_PASSWORD: ${{ secrets.PGP_PASSWORD }} | ||
run: | | ||
version=$(grep '^version =' src-tauri/Cargo.toml | cut -d '"' -f2) | ||
echo "Version: $version" | ||
releases=$(gh release list --limit 20 --json tagName,name,isDraft,isPrerelease) | ||
releaseInfo=$(echo "$releases" | jq -r '.[] | select(.isDraft == true and (.tagName | contains("'"$version"'"))) | .tagName' | head -n1) | ||
if [ -z "$releaseInfo" ]; then | ||
echo "Error: Could not find a draft release for version $version" | ||
exit 1 | ||
fi | ||
tagName="$releaseInfo" | ||
echo "Found draft release: $tagName" | ||
# Create a temporary directory for downloaded assets | ||
mkdir -p tmp_assets | ||
cd tmp_assets | ||
# Download all assets | ||
gh release download "$tagName" --pattern "*" | ||
# Create SHA256SUMS.txt | ||
sha256sum * > SHA256SUMS.txt | ||
# Sign SHA256SUMS.txt | ||
gpg --batch --yes --passphrase "$PGP_PASSWORD" --pinentry-mode loopback --detach-sig --armor SHA256SUMS.txt | ||
# Upload SHA256SUMS.txt and SHA256SUMS.txt.asc | ||
gh release upload "$tagName" SHA256SUMS.txt SHA256SUMS.txt.asc --clobber | ||
cd .. | ||
rm -rf tmp_assets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: "release" | ||
|
||
on: | ||
push: | ||
branches: | ||
- release | ||
|
||
# This workflow will trigger on each push to the `release` branch to create or update a GitHub release, build your app, and upload the artifacts to the release. | ||
|
||
jobs: | ||
publish-tauri: | ||
permissions: | ||
contents: write | ||
actions: read | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- platform: "macos-latest" # for Arm based macs (M1 and above). | ||
args: "--target aarch64-apple-darwin" | ||
- platform: "macos-latest" # for Intel based macs. | ||
args: "--target x86_64-apple-darwin" | ||
- platform: "ubuntu-20.04" | ||
args: "" | ||
- platform: "windows-latest" | ||
args: "" | ||
|
||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: install Rust stable | ||
uses: dtolnay/rust-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 libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | ||
- name: import windows certificate | ||
if: matrix.platform == 'windows-latest' | ||
env: | ||
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }} | ||
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} | ||
run: | | ||
New-Item -ItemType directory -Path certificate | ||
Set-Content -Path certificate/tempCert.txt -Value $env:WINDOWS_CERTIFICATE | ||
certutil -decode certificate/tempCert.txt certificate/certificate.pfx | ||
Remove-Item -path certificate -include tempCert.txt | ||
Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText) | ||
- name: install frontend dependencies | ||
run: npm install | ||
|
||
- name: update app icon | ||
run: npm run tauri icon app-icons/release-icon.png | ||
|
||
- uses: tauri-apps/tauri-action@v0 | ||
id: tauri-build | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | ||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | ||
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | ||
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | ||
with: | ||
tagName: keeper-desktop-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. | ||
releaseName: "Keeper Desktop v__VERSION__" | ||
releaseBody: "See the assets to download this version and install." | ||
releaseDraft: true | ||
prerelease: false | ||
args: ${{ matrix.args }} --config src-tauri/tauri.release.conf.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"singleQuote": false, | ||
"trailingComma": "all", | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"semi": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"] | ||
} |
Oops, something went wrong.