mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-09-11 12:25:42 +03:00
build app with github actions
This commit is contained in:
parent
bb98b5411d
commit
999bc2f019
40
.github/workflows/pr.yaml
vendored
Normal file
40
.github/workflows/pr.yaml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: "Test"
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
test-tauri:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [macos-latest, macos-aarch64]
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 7.x.x
|
||||
run_install: |
|
||||
args: ["--frozen-lockfile"]
|
||||
|
||||
- name: Setup rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
# TODO: figure out how to build aarch64 git on x86_64 runner
|
||||
- name: Build git
|
||||
run: cd src-tauri/binaries && make
|
||||
|
||||
- name: Build tauri
|
||||
uses: tauri-apps/tauri-action@v0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tauriScript: "pnpm tauri"
|
48
.github/workflows/publish.yaml
vendored
Normal file
48
.github/workflows/publish.yaml
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
name: "publish"
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
pull_request: {}
|
||||
|
||||
jobs:
|
||||
publish-tauri:
|
||||
permissions:
|
||||
contents: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [macos-latest, macos-aarch64]
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 7.x.x
|
||||
run_install: |
|
||||
args: ["--frozen-lockfile"]
|
||||
|
||||
- name: Setup rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
# TODO: figure out how to build aarch64 git on x86_64 runner
|
||||
- name: Build git
|
||||
run: cd src-tauri/binaries && make
|
||||
|
||||
- uses: tauri-apps/tauri-action@v0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tauriScript: 'pnpm tauri'
|
||||
tagName: app-v__VERSION__
|
||||
releaseName: "App v__VERSION__"
|
||||
releaseBody: "See the assets to download this version and install."
|
||||
releaseDraft: true
|
||||
prerelease: false
|
12
README.md
12
README.md
@ -14,3 +14,15 @@ $ pnpm install
|
||||
```bash
|
||||
$ pnpm tauri dev
|
||||
```
|
||||
|
||||
## releasing
|
||||
|
||||
Releasing is done via [GitHub Action](https://github.com/gitbutlerapp/gitbutler-client-tauri/actions/workflows/publish.yaml).
|
||||
|
||||
### runners
|
||||
|
||||
Note that to build an arm64 macos app, you need to make sure that there is at least one self-hosted runner
|
||||
with `macos-aarch64` label is online [here](https://github.com/gitbutlerapp/gitbutler-client-tauri/settings/actions/runners).
|
||||
|
||||
If you are a lucky owner of an arm64 macos machine, feel free to [run it yourself](https://github.com/gitbutlerapp/gitbutler-client-tauri/settings/actions/runners/new).
|
||||
Make sure to label it with `macos-aarch64`.
|
||||
|
9
scripts/build.sh
Executable file
9
scripts/build.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
PWD="$(dirname $(readlink -f -- $0))"
|
||||
|
||||
echo $PWD
|
@ -7,7 +7,7 @@
|
||||
"withGlobalTauri": false
|
||||
},
|
||||
"package": {
|
||||
"productName": "git-butler-tauri",
|
||||
"productName": "GitButler",
|
||||
"version": "0.0.0"
|
||||
},
|
||||
"tauri": {
|
||||
@ -46,11 +46,9 @@
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"identifier": "com.gitbutler.app",
|
||||
"category": "DeveloperTool",
|
||||
"copyright": "",
|
||||
"deb": {
|
||||
"depends": []
|
||||
},
|
||||
"copyright": "Copyright © 2023 GitButler. All rights reserved.",
|
||||
"externalBin": ["binaries/git"],
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
@ -59,22 +57,13 @@
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
],
|
||||
"identifier": "com.tauri.dev",
|
||||
"longDescription": "",
|
||||
"targets": ["dmg"],
|
||||
"macOS": {
|
||||
"entitlements": null,
|
||||
"exceptionDomain": "",
|
||||
"frameworks": [],
|
||||
"providerShortName": null,
|
||||
"signingIdentity": null
|
||||
},
|
||||
"resources": [],
|
||||
"shortDescription": "",
|
||||
"targets": "all",
|
||||
"windows": {
|
||||
"certificateThumbprint": null,
|
||||
"digestAlgorithm": "sha256",
|
||||
"timestampUrl": ""
|
||||
}
|
||||
},
|
||||
"security": {
|
||||
|
Loading…
Reference in New Issue
Block a user