mirror of
https://github.com/ivabus/gui
synced 2025-06-08 00:00:27 +03:00
#18 update release
This commit is contained in:
parent
c9f17c398a
commit
928192a13c
1 changed files with 39 additions and 22 deletions
61
.github/workflows/release.yml
vendored
61
.github/workflows/release.yml
vendored
|
@ -5,12 +5,19 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_release_tauri:
|
build_release_tauri:
|
||||||
|
runs-on: ${{ matrix.platform.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
matrix:
|
||||||
platform: [macos-latest, ubuntu-latest]
|
platform:
|
||||||
|
- os: macos-11
|
||||||
runs-on: ${{ matrix.platform }}
|
name: darwin+x86-64
|
||||||
|
- os: ubuntu-latest
|
||||||
|
name: linux+x86-64
|
||||||
|
- os: [self-hosted, macOS, ARM64]
|
||||||
|
name: darwin+aarch64
|
||||||
|
# - os: [self-hosted, linux, ARM64]
|
||||||
|
# name: linux+aarch64
|
||||||
|
container: ${{ matrix.platform.container }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
@ -27,15 +34,27 @@ jobs:
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
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
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
# The prefix cache key, this can be changed to start a new cache manually.
|
# The prefix cache key, this can be changed to start a new cache manually.
|
||||||
# default: "v0-rust"
|
# default: "v0-rust"
|
||||||
prefix-key: ${{ matrix.platform }}
|
prefix-key: ${{ matrix.platform.name }}
|
||||||
shared-key: prod
|
shared-key: prod
|
||||||
cache-targets: false
|
cache-targets: false
|
||||||
- name: install dependencies (ubuntu only)
|
- name: install dependencies (ubuntu only)
|
||||||
if: matrix.platform == 'ubuntu-latest'
|
if: matrix.platform.name == 'linux+x86-64'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
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
|
||||||
|
@ -47,9 +66,9 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
./modules/gui/src-tauri/target
|
./modules/gui/src-tauri/target
|
||||||
key: ${{ matrix.platform }}-build-target-prod
|
key: ${{ matrix.platform.name }}-build-target-prod
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ matrix.platform }}-build-target-prod
|
${{ matrix.platform.name }}-build-target-prod
|
||||||
|
|
||||||
- name: test build tauri
|
- name: test build tauri
|
||||||
run: pnpm --filter gui tauri build
|
run: pnpm --filter gui tauri build
|
||||||
|
@ -67,24 +86,22 @@ jobs:
|
||||||
- name: Set tag
|
- name: Set tag
|
||||||
id: tag
|
id: tag
|
||||||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||||
- name: UBUNTU publish release
|
|
||||||
if: matrix.platform == 'ubuntu-latest'
|
- name: publish release
|
||||||
|
env:
|
||||||
|
platform: ${{ steps.build_platform.outputs.build_platform }}
|
||||||
|
extension: ${{ steps.build_platform.outputs.extension }}
|
||||||
|
tag: ${{ steps.tag.outputs.tag }}
|
||||||
run: |
|
run: |
|
||||||
aws s3 cp ./modules/gui/src-tauri/target/release/bundle/deb/tea_0.1.0_amd64.deb \
|
aws s3 cp "./modules/gui/src-tauri/target/release/bundle/$extension/tea_0.1.0_$platform.$extension" \
|
||||||
s3://preview.gui.tea.xyz/release/tea_gui_latest.${{matrix.platform}}.deb
|
"s3://preview.gui.tea.xyz/release/tea_gui_latest_$platform.$extension"
|
||||||
aws s3 cp ./modules/gui/src-tauri/target/release/bundle/deb/tea_0.1.0_amd64.deb \
|
aws s3 cp "./modules/gui/src-tauri/target/release/bundle/$extension/tea_0.1.0_$platform.$extension" \
|
||||||
s3://preview.gui.tea.xyz/release/tea_gui_${{steps.tag.outputs.tag}}.${{matrix.platform}}.deb
|
"s3://preview.gui.tea.xyz/release/tea_gui_$tag_$platform.$extension"
|
||||||
- name: MAC INTEL publish release
|
|
||||||
if: matrix.platform == 'macos-latest'
|
|
||||||
run: |
|
|
||||||
aws s3 cp ./modules/gui/src-tauri/target/release/bundle/dmg/tea_0.1.0_x64.dmg \
|
|
||||||
s3://preview.gui.tea.xyz/release/tea_gui_latest.${{matrix.platform}}.dmg
|
|
||||||
aws s3 cp ./modules/gui/src-tauri/target/release/bundle/dmg/tea_0.1.0_x64.dmg \
|
|
||||||
s3://preview.gui.tea.xyz/release/tea_gui_${{steps.tag.outputs.tag}}.${{matrix.platform}}.dmg
|
|
||||||
- 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 }}
|
PLATFORM: ${{ matrix.platform }}
|
||||||
VERSION: ${{steps.tag.outputs.tag}}
|
VERSION: ${{steps.tag.outputs.tag}}
|
||||||
DOWNLOAD_URL: http://preview.gui.tea.xyz.s3-website-us-east-1.amazonaws.com/release/tea_gui_${{steps.tag.outputs.tag}}.${{matrix.platform}}.${{ matrix.platform == 'ubuntu-latest' && 'deb' || 'dmg'}}
|
DOWNLOAD_URL: http://preview.gui.tea.xyz.s3-website-us-east-1.amazonaws.com/release/tea_gui_${{steps.tag.outputs.tag}}_${{steps.build_platform.outputs.build_platform}}.${{ steps.build_platform.outputs.extension }}
|
||||||
|
|
Loading…
Reference in a new issue