mirror of
https://github.com/ivabus/gui
synced 2025-06-07 15:50:27 +03:00
test split jobs
This commit is contained in:
parent
ed0bfbb66a
commit
9a311794c5
1 changed files with 97 additions and 55 deletions
152
.github/workflows/main.yml
vendored
152
.github/workflows/main.yml
vendored
|
@ -4,6 +4,7 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
- notorize
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -59,33 +60,55 @@ jobs:
|
||||||
container: ${{ matrix.platform.container }}
|
container: ${{ matrix.platform.container }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- uses: teaxyz/setup@v0
|
||||||
|
|
||||||
- name: build tauri for MacOS
|
- name: build tauri for MacOS
|
||||||
# uses: teaxyz/setup@v0
|
|
||||||
if: startsWith(matrix.platform.name, 'darwin')
|
if: startsWith(matrix.platform.name, 'darwin')
|
||||||
# FROM: https://tauri.app/v1/guides/distribution/sign-macos
|
run: tea -ES xc build
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
ENABLE_CODE_SIGNING: ${{ secrets.GUI_APPLE_CERTIFICATE }}
|
|
||||||
APPLE_CERTIFICATE: ${{ secrets.GUI_APPLE_CERTIFICATE }}
|
|
||||||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.GUI_APPLE_CERTIFICATE_PASSWORD }}
|
|
||||||
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
|
||||||
# todo: uncomment when m1 with latest xcode is deployed
|
|
||||||
# this only helps in notarization
|
|
||||||
# APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
||||||
# APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
sh <(curl https://tea.xyz) -ES xc build
|
|
||||||
|
|
||||||
- name: build tauri for Linux
|
- name: build tauri for Linux
|
||||||
# uses: teaxyz/setup@v0
|
|
||||||
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
|
||||||
uses: docker://getneil/tea-builder:latest
|
uses: docker://getneil/tea-builder:latest
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
tar -czvf artifacts.tgz -C ./modules/gui/src-tauri/target/release/bundle .
|
||||||
|
|
||||||
|
- name: upload artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.platform.name }}
|
||||||
|
path: artifacts.tgz
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
notorize_tauri:
|
||||||
|
needs: [build_tauri]
|
||||||
|
runs-on: macos-11
|
||||||
|
steps:
|
||||||
|
- run: >
|
||||||
|
true
|
||||||
|
|
||||||
|
upload:
|
||||||
|
needs: [build_tauri, notorize_tauri]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
platform:
|
||||||
|
- darwin+x86-64
|
||||||
|
- linux+x86-64
|
||||||
|
- darwin+aarch64
|
||||||
|
# - linux+aarch64
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.platform }}
|
||||||
|
|
||||||
|
- run: tar xzf artifacts.tgz
|
||||||
|
|
||||||
- name: Get current unix ts - seconds
|
- name: Get current unix ts - seconds
|
||||||
id: date
|
id: date
|
||||||
run: echo "unix_seconds=$(date +'%s')" >> $GITHUB_OUTPUT
|
run: echo "unix_seconds=$(date +'%s')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- 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 }}
|
||||||
|
@ -95,53 +118,72 @@ jobs:
|
||||||
- name: build platform output
|
- name: build platform output
|
||||||
id: build_platform
|
id: build_platform
|
||||||
env:
|
env:
|
||||||
platform: ${{ matrix.platform.name }}
|
platform: ${{ matrix.platform }}
|
||||||
run: |
|
run: |
|
||||||
BUILD_PLATFORM=$(echo $platform | sed -e "s/darwin+//g" | sed -e "s/linux+//g")
|
BUILD_PLATFORM=$(echo $platform | sed -e "s/darwin+//g" | sed -e "s/linux+//g")
|
||||||
EXTENSION=dmg
|
EXTENSION=dmg
|
||||||
[[ $BUILD_PLATFORM = "x86-64" ]] && BUILD_PLATFORM="x64" || BUILD_PLATFORM=$BUILD_PLATFORM
|
case $platform in
|
||||||
[[ $platform = "linux+x86-64" ]] && BUILD_PLATFORM="amd64" || BUILD_PLATFORM=$BUILD_PLATFORM
|
"linux+x86-64")
|
||||||
[[ $platform = "linux+x86-64" ]] && EXTENSION="deb"
|
BUILD_PLATFORM="amd64"
|
||||||
|
EXTENSION="deb"
|
||||||
|
;;
|
||||||
|
"linux+aarch64")
|
||||||
|
BUILD_PLATFORM="aarch64"
|
||||||
|
EXTENSION="deb"
|
||||||
|
;;
|
||||||
|
"darwin+aarch64")
|
||||||
|
BUILD_PLATFORM="aarch64"
|
||||||
|
EXTENSION="dmg"
|
||||||
|
;;
|
||||||
|
"darwin+x86-64")
|
||||||
|
BUILD_PLATFORM="x64"
|
||||||
|
EXTENSION="dmg"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown platform $platform"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
echo "build_platform=$BUILD_PLATFORM" >> $GITHUB_OUTPUT
|
echo "build_platform=$BUILD_PLATFORM" >> $GITHUB_OUTPUT
|
||||||
echo "extension=$EXTENSION" >> $GITHUB_OUTPUT
|
echo "extension=$EXTENSION" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: zip .app for MacOS
|
- name: zip .app for MacOS
|
||||||
if: startsWith(matrix.platform.name, 'darwin')
|
if: startsWith(matrix.platform, 'darwin')
|
||||||
run: |
|
run: |
|
||||||
cd ./modules/gui/src-tauri/target/release/bundle/macos/ && zip -r tea.zip tea.app
|
cd ./macos/ && zip -r tea.zip tea.app
|
||||||
|
|
||||||
- name: cp package images from prod to gui bucket
|
# - name: cp package images from prod to gui bucket
|
||||||
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 }}
|
||||||
extension: ${{steps.build_platform.outputs.extension}}
|
# extension: ${{steps.build_platform.outputs.extension}}
|
||||||
run: |
|
# run: |
|
||||||
aws s3 cp "./modules/gui/src-tauri/target/release/bundle/$extension/tea_0.1.0_$platform.$extension" \
|
# aws s3 cp "./$extension/tea_0.1.0_$platform.$extension" \
|
||||||
"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: startsWith(matrix.platform.name, 'darwin')
|
# if: startsWith(matrix.platform, '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 }}
|
||||||
run: |
|
# run: |
|
||||||
aws s3 cp ./modules/gui/src-tauri/target/release/bundle/macos/tea.zip "s3://preview.gui.tea.xyz/release/tea_${{ steps.date.outputs.unix_seconds }}_$platform.zip"
|
# aws s3 cp ./macos/tea.zip "s3://preview.gui.tea.xyz/release/tea_${{ steps.date.outputs.unix_seconds }}_$platform.zip"
|
||||||
- uses: actions/setup-node@v3
|
# - uses: actions/setup-node@v3
|
||||||
with:
|
# with:
|
||||||
node-version: 18
|
# node-version: 18
|
||||||
- name: Slack Notification
|
# - name: Slack Notification
|
||||||
run: ./.github/notify-slack.js
|
# run: ./.github/notify-slack.js
|
||||||
env:
|
# env:
|
||||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||||
PLATFORM: ${{ matrix.platform.name }}
|
# PLATFORM: ${{ matrix.platform }}
|
||||||
EXT: ${{ steps.build_platform.outputs.extension }}
|
# EXT: ${{ steps.build_platform.outputs.extension }}
|
||||||
DOWNLOAD_URL: http://preview.gui.tea.xyz.s3-website-us-east-1.amazonaws.com/release/tea_${{ steps.date.outputs.unix_seconds }}_${{ steps.build_platform.outputs.build_platform }}.${{ steps.build_platform.outputs.extension }}
|
# DOWNLOAD_URL: http://preview.gui.tea.xyz.s3-website-us-east-1.amazonaws.com/release/tea_${{ steps.date.outputs.unix_seconds }}_${{ steps.build_platform.outputs.build_platform }}.${{ steps.build_platform.outputs.extension }}
|
||||||
|
|
||||||
- name: Slack Notification for .app Mac
|
# - name: Slack Notification for .app Mac
|
||||||
run: ./.github/notify-slack.js
|
# run: ./.github/notify-slack.js
|
||||||
if: startsWith(matrix.platform.name, 'darwin')
|
# if: startsWith(matrix.platform, 'darwin')
|
||||||
env:
|
# env:
|
||||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||||
PLATFORM: ${{ matrix.platform.name }}
|
# PLATFORM: ${{ matrix.platform }}
|
||||||
EXT: .zip(.app)
|
# EXT: .zip(.app)
|
||||||
DOWNLOAD_URL: http://preview.gui.tea.xyz.s3-website-us-east-1.amazonaws.com/release/tea_${{ steps.date.outputs.unix_seconds }}_${{ steps.build_platform.outputs.build_platform }}.zip
|
# DOWNLOAD_URL: http://preview.gui.tea.xyz.s3-website-us-east-1.amazonaws.com/release/tea_${{ steps.date.outputs.unix_seconds }}_${{ steps.build_platform.outputs.build_platform }}.zip
|
||||||
|
|
Loading…
Reference in a new issue