mirror of
https://github.com/ivabus/gui
synced 2025-06-07 15:50:27 +03:00
#109 final init implementatin of tea in gha
This commit is contained in:
parent
f6b464875b
commit
d6a31766a7
4 changed files with 53 additions and 156 deletions
43
.github/workflows/ci.yml
vendored
43
.github/workflows/ci.yml
vendored
|
@ -66,25 +66,12 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
- name: build tauri for Linux
|
||||||
persist-credentials: false
|
# uses: teaxyz/setup@v0
|
||||||
- uses: pnpm/action-setup@v2
|
if: startsWith(matrix.platform.name, 'linux')
|
||||||
with:
|
run: |
|
||||||
version: 7
|
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf pkg-config
|
||||||
- name: setup node
|
sh <(curl https://tea.xyz) build
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: 18
|
|
||||||
cache: 'pnpm'
|
|
||||||
cache-dependency-path: pnpm-lock.yaml
|
|
||||||
- name: install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- name: install app dependencies and build it
|
|
||||||
env:
|
|
||||||
BUILD_FOR: preview
|
|
||||||
run: pnpm install && pnpm --filter gui build
|
|
||||||
- uses: aws-actions/configure-aws-credentials@v1
|
- uses: aws-actions/configure-aws-credentials@v1
|
||||||
with:
|
with:
|
||||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
@ -121,17 +108,17 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform:
|
platform:
|
||||||
# - os: macos-11
|
- os: macos-11
|
||||||
# name: darwin+x86-64
|
name: darwin+x86-64
|
||||||
# id: mac_latest
|
id: mac_latest
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
name: linux+x86-64
|
name: linux+x86-64
|
||||||
id: linux
|
id: linux
|
||||||
# - os: [self-hosted, macOS, ARM64]
|
- os: [self-hosted, macOS, ARM64]
|
||||||
# name: darwin+aarch64
|
name: darwin+aarch64
|
||||||
# id: mac_m1
|
id: mac_m1
|
||||||
# note: if this fails maybe the runner got replaced, manually installed gtk there
|
# err: Package atk was not found in the pkg-config search path.
|
||||||
# sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
|
# requires atk >= 2.18
|
||||||
# - os: [self-hosted, linux, ARM64]
|
# - os: [self-hosted, linux, ARM64]
|
||||||
# name: linux+aarch64
|
# name: linux+aarch64
|
||||||
container: ${{ matrix.platform.container }}
|
container: ${{ matrix.platform.container }}
|
||||||
|
@ -166,7 +153,7 @@ jobs:
|
||||||
if: startsWith(matrix.platform.name, 'linux')
|
if: startsWith(matrix.platform.name, 'linux')
|
||||||
# TODO: https://tauri.app/v1/guides/distribution/sign-linux
|
# TODO: https://tauri.app/v1/guides/distribution/sign-linux
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
|
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf pkg-config
|
||||||
sh <(curl https://tea.xyz) build
|
sh <(curl https://tea.xyz) build
|
||||||
|
|
||||||
- name: build platform output
|
- name: build platform output
|
||||||
|
|
88
.github/workflows/main.yml
vendored
88
.github/workflows/main.yml
vendored
|
@ -37,26 +37,12 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- uses: pnpm/action-setup@v2
|
- name: build tauri for Linux
|
||||||
with:
|
if: startsWith(matrix.platform.name, 'linux')
|
||||||
version: 7
|
run: |
|
||||||
- name: setup node
|
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf pkg-config
|
||||||
uses: actions/setup-node@v1
|
sh <(curl https://tea.xyz) build
|
||||||
with:
|
|
||||||
node-version: 18
|
|
||||||
cache: 'pnpm'
|
|
||||||
cache-dependency-path: pnpm-lock.yaml
|
|
||||||
- name: install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- name: install app dependencies and build it
|
|
||||||
run: pnpm install && pnpm --filter gui build
|
|
||||||
- uses: aws-actions/configure-aws-credentials@v1
|
|
||||||
with:
|
|
||||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
||||||
aws-region: us-east-1
|
|
||||||
build_tauri:
|
build_tauri:
|
||||||
needs: changes
|
needs: changes
|
||||||
if: needs.changes.outputs.tauri == 'true'
|
if: needs.changes.outputs.tauri == 'true'
|
||||||
|
@ -74,47 +60,10 @@ jobs:
|
||||||
# name: linux+aarch64
|
# name: linux+aarch64
|
||||||
container: ${{ matrix.platform.container }}
|
container: ${{ matrix.platform.container }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
- name: setup node
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: 18
|
|
||||||
cache: 'pnpm'
|
|
||||||
cache-dependency-path: pnpm-lock.yaml
|
|
||||||
- name: install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
# The prefix cache key, this can be changed to start a new cache manually.
|
|
||||||
# default: "v0-rust"
|
|
||||||
prefix-key: ${{ matrix.platform.name }}
|
|
||||||
shared-key: prod
|
|
||||||
cache-targets: false
|
|
||||||
- name: install dependencies (ubuntu only)
|
|
||||||
if: matrix.platform.name == 'linux+x86-64'
|
|
||||||
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
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Cache Tauri Target
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
./modules/gui/src-tauri/target
|
|
||||||
key: ${{ matrix.platform.name }}-build-target-prod
|
|
||||||
restore-keys: |
|
|
||||||
${{ matrix.platform.name }}-build-target-prod
|
|
||||||
|
|
||||||
- name: test build tauri for MacOS
|
- name: test build tauri for MacOS
|
||||||
if: matrix.platform.name == 'darwin+x86-64' || matrix.platform.name == 'darwin+aarch64'
|
if: startsWith(matrix.platform.name, 'darwin')
|
||||||
# FROM: https://tauri.app/v1/guides/distribution/sign-macos
|
# FROM: https://tauri.app/v1/guides/distribution/sign-macos
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -122,14 +71,19 @@ jobs:
|
||||||
APPLE_CERTIFICATE: ${{ secrets.GUI_APPLE_CERTIFICATE }}
|
APPLE_CERTIFICATE: ${{ secrets.GUI_APPLE_CERTIFICATE }}
|
||||||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.GUI_APPLE_CERTIFICATE_PASSWORD }}
|
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.GUI_APPLE_CERTIFICATE_PASSWORD }}
|
||||||
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
# todo: uncomment when m1 with latest xcode is deployed
|
||||||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
# this only helps in notarization
|
||||||
|
# APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
|
# APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||||||
run: pnpm build:gui
|
run: pnpm build:gui
|
||||||
|
|
||||||
- name: test build tauri for Linux
|
- name: build tauri for Linux
|
||||||
if: matrix.platform.name == 'linux+x86-64'
|
# uses: teaxyz/setup@v0
|
||||||
|
if: startsWith(matrix.platform.name, 'linux')
|
||||||
# TODO: https://tauri.app/v1/guides/distribution/sign-linux
|
# TODO: https://tauri.app/v1/guides/distribution/sign-linux
|
||||||
run: pnpm build:gui
|
run: |
|
||||||
|
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf pkg-config
|
||||||
|
sh <(curl https://tea.xyz) build
|
||||||
|
|
||||||
- name: Get current unix ts - seconds
|
- name: Get current unix ts - seconds
|
||||||
id: date
|
id: date
|
||||||
|
@ -154,7 +108,7 @@ jobs:
|
||||||
echo "extension=$EXTENSION" >> $GITHUB_OUTPUT
|
echo "extension=$EXTENSION" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: zip .app for MacOS
|
- name: zip .app for MacOS
|
||||||
if: matrix.platform.name == 'darwin+x86-64' || matrix.platform.name == 'darwin+aarch64'
|
if: startsWith(matrix.platform.name, 'darwin')
|
||||||
run: |
|
run: |
|
||||||
cd ./modules/gui/src-tauri/target/release/bundle/macos/ && zip -r tea.zip tea.app
|
cd ./modules/gui/src-tauri/target/release/bundle/macos/ && zip -r tea.zip tea.app
|
||||||
|
|
||||||
|
@ -168,7 +122,7 @@ jobs:
|
||||||
"s3://preview.gui.tea.xyz/release/tea_${{ steps.date.outputs.unix_seconds }}_$platform.$extension"
|
"s3://preview.gui.tea.xyz/release/tea_${{ steps.date.outputs.unix_seconds }}_$platform.$extension"
|
||||||
|
|
||||||
- name: cp package zip for MacOS
|
- name: cp package zip for MacOS
|
||||||
if: matrix.platform.name == 'darwin+x86-64' || matrix.platform.name == 'darwin+aarch64'
|
if: startsWith(matrix.platform.name, 'darwin')
|
||||||
env:
|
env:
|
||||||
platform: ${{ steps.build_platform.outputs.build_platform }}
|
platform: ${{ steps.build_platform.outputs.build_platform }}
|
||||||
build_platform: ${{ matrix.platform.name }}
|
build_platform: ${{ matrix.platform.name }}
|
||||||
|
@ -185,7 +139,7 @@ jobs:
|
||||||
|
|
||||||
- name: Slack Notification for .app Mac
|
- name: Slack Notification for .app Mac
|
||||||
run: ./.github/notify-slack.js
|
run: ./.github/notify-slack.js
|
||||||
if: matrix.platform.name == 'darwin+x86-64' || matrix.platform.name == 'darwin+aarch64'
|
if: startsWith(matrix.platform.name, 'darwin')
|
||||||
env:
|
env:
|
||||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||||
PLATFORM: ${{ matrix.platform.name }}
|
PLATFORM: ${{ matrix.platform.name }}
|
||||||
|
|
77
.github/workflows/release.yml
vendored
77
.github/workflows/release.yml
vendored
|
@ -19,59 +19,10 @@ jobs:
|
||||||
# name: linux+aarch64
|
# name: linux+aarch64
|
||||||
container: ${{ matrix.platform.container }}
|
container: ${{ matrix.platform.container }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2
|
- name: build tauri for MacOS
|
||||||
with:
|
if: startsWith(matrix.platform.name, 'darwin')
|
||||||
version: 7
|
|
||||||
- name: setup node
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: 18
|
|
||||||
cache: 'pnpm'
|
|
||||||
cache-dependency-path: pnpm-lock.yaml
|
|
||||||
- name: install Rust stable
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- name: build platform output
|
|
||||||
id: build_platform
|
|
||||||
env:
|
|
||||||
platform: ${{ matrix.platform.name }}
|
|
||||||
run: |
|
|
||||||
BUILD_PLATFORM=$(echo $platform | sed -e "s/darwin+//g" | sed -e "s/linux+//g")
|
|
||||||
EXTENSION=dmg
|
|
||||||
[[ $BUILD_PLATFORM = "x86-64" ]] && BUILD_PLATFORM="x64" || BUILD_PLATFORM=$BUILD_PLATFORM
|
|
||||||
[[ $platform = "linux+x86-64" ]] && BUILD_PLATFORM="amd64" || BUILD_PLATFORM=$BUILD_PLATFORM
|
|
||||||
[[ $platform = "linux+x86-64" ]] && EXTENSION="deb"
|
|
||||||
echo "build_platform=$BUILD_PLATFORM" >> $GITHUB_OUTPUT
|
|
||||||
echo "extension=$EXTENSION" >> $GITHUB_OUTPUT
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
# The prefix cache key, this can be changed to start a new cache manually.
|
|
||||||
# default: "v0-rust"
|
|
||||||
prefix-key: ${{ matrix.platform.name }}
|
|
||||||
shared-key: prod
|
|
||||||
cache-targets: false
|
|
||||||
- name: install dependencies (ubuntu only)
|
|
||||||
if: matrix.platform.name == 'linux+x86-64'
|
|
||||||
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
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Cache Tauri Target
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
./modules/gui/src-tauri/target
|
|
||||||
key: ${{ matrix.platform.name }}-build-target-prod
|
|
||||||
restore-keys: |
|
|
||||||
${{ matrix.platform.name }}-build-target-prod
|
|
||||||
|
|
||||||
- name: test build tauri for MacOS
|
|
||||||
if: matrix.platform.name == 'darwin+x86-64' || matrix.platform.name == 'darwin+aarch64'
|
|
||||||
# FROM: https://tauri.app/v1/guides/distribution/sign-macos
|
# FROM: https://tauri.app/v1/guides/distribution/sign-macos
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -79,14 +30,20 @@ jobs:
|
||||||
APPLE_CERTIFICATE: ${{ secrets.GUI_APPLE_CERTIFICATE }}
|
APPLE_CERTIFICATE: ${{ secrets.GUI_APPLE_CERTIFICATE }}
|
||||||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.GUI_APPLE_CERTIFICATE_PASSWORD }}
|
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.GUI_APPLE_CERTIFICATE_PASSWORD }}
|
||||||
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
# todo: uncomment when m1 with latest xcode is deployed
|
||||||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
# this only helps in notarization
|
||||||
|
# APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
|
# APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||||||
run: pnpm build:gui
|
run: pnpm build:gui
|
||||||
|
|
||||||
- name: test build tauri for Linux
|
- name: build tauri for Linux
|
||||||
if: matrix.platform.name == 'linux+x86-64'
|
# uses: teaxyz/setup@v0
|
||||||
|
if: startsWith(matrix.platform.name, 'linux')
|
||||||
# TODO: https://tauri.app/v1/guides/distribution/sign-linux
|
# TODO: https://tauri.app/v1/guides/distribution/sign-linux
|
||||||
run: pnpm build:gui
|
run: |
|
||||||
|
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf pkg-config
|
||||||
|
sh <(curl https://tea.xyz) build
|
||||||
|
|
||||||
|
|
||||||
- name: Get current unix ts - seconds
|
- name: Get current unix ts - seconds
|
||||||
id: date
|
id: date
|
||||||
|
@ -114,12 +71,12 @@ jobs:
|
||||||
"s3://preview.gui.tea.xyz/release/tea_gui_$tag_$platform.$extension"
|
"s3://preview.gui.tea.xyz/release/tea_gui_$tag_$platform.$extension"
|
||||||
|
|
||||||
- name: zip .app for MacOS
|
- name: zip .app for MacOS
|
||||||
if: matrix.platform.name == 'darwin+x86-64' || matrix.platform.name == 'darwin+aarch64'
|
if: startsWith(matrix.platform.name, 'darwin')
|
||||||
run: |
|
run: |
|
||||||
cd ./modules/gui/src-tauri/target/release/bundle/macos/ && zip -r tea.zip tea.app
|
cd ./modules/gui/src-tauri/target/release/bundle/macos/ && zip -r tea.zip tea.app
|
||||||
|
|
||||||
- name: publish .zip(.app) for MacOS
|
- name: publish .zip(.app) for MacOS
|
||||||
if: matrix.platform.name == 'darwin+x86-64' || matrix.platform.name == 'darwin+aarch64'
|
if: startsWith(matrix.platform.name, 'darwin')
|
||||||
env:
|
env:
|
||||||
platform: ${{ steps.build_platform.outputs.build_platform }}
|
platform: ${{ steps.build_platform.outputs.build_platform }}
|
||||||
extension: ${{ steps.build_platform.outputs.extension }}
|
extension: ${{ steps.build_platform.outputs.extension }}
|
||||||
|
@ -140,7 +97,7 @@ jobs:
|
||||||
|
|
||||||
- name: Slack Notification for .app Mac
|
- name: Slack Notification for .app Mac
|
||||||
run: ./.github/notify-slack.js
|
run: ./.github/notify-slack.js
|
||||||
if: matrix.platform.name == 'darwin+x86-64' || matrix.platform.name == 'darwin+aarch64'
|
if: startsWith(matrix.platform.name, 'darwin')
|
||||||
env:
|
env:
|
||||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||||
PLATFORM: ${{ matrix.platform.name }}
|
PLATFORM: ${{ matrix.platform.name }}
|
||||||
|
|
|
@ -13,7 +13,6 @@ For better documentation checkout this [notion](https://www.notion.so/teaxyz/tea
|
||||||
| nodejs.org | >=16 |
|
| nodejs.org | >=16 |
|
||||||
| pnpm.io | >=7.18.2 |
|
| pnpm.io | >=7.18.2 |
|
||||||
| rust-lang.org | >=1.62 |
|
| rust-lang.org | >=1.62 |
|
||||||
| freedesktop.org/pkg-config | >=0.29 |
|
|
||||||
|
|
||||||
# Getting Started
|
# Getting Started
|
||||||
```sh
|
```sh
|
||||||
|
|
Loading…
Reference in a new issue