mirror of
https://github.com/FranP-code/TurboRun.git
synced 2025-10-13 00:14:01 +00:00
Update release.yml
This commit is contained in:
156
.github/workflows/release.yml
vendored
156
.github/workflows/release.yml
vendored
@@ -3,25 +3,153 @@ on:
|
|||||||
types: [created]
|
types: [created]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
build-chatgpt:
|
||||||
name: release ${{ matrix.target }}
|
runs-on: ${{ matrix.os }}
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- target: x86_64-pc-windows-gnu
|
- build: linux
|
||||||
archive: zip
|
os: ubuntu-latest
|
||||||
- target: x86_64-unknown-linux-musl
|
arch: x86_64
|
||||||
archive: tar.gz tar.xz tar.zst
|
target: x86_64-unknown-linux-gnu
|
||||||
- target: x86_64-apple-darwin
|
- build: macos
|
||||||
archive: zip
|
os: macos-latest
|
||||||
|
arch: x86_64
|
||||||
|
target: x86_64-apple-darwin
|
||||||
|
- build: macos
|
||||||
|
os: macos-latest
|
||||||
|
arch: aarch64
|
||||||
|
target: aarch64-apple-darwin
|
||||||
|
- build: windows
|
||||||
|
os: windows-latest
|
||||||
|
arch: x86_64
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@v3
|
||||||
- name: Compile and release
|
|
||||||
uses: rust-build/rust-build.action@v1.4.3
|
# - uses: pnpm/action-setup@v2
|
||||||
|
# name: Install pnpm
|
||||||
|
# id: pnpm-install
|
||||||
|
# with:
|
||||||
|
# version: 7
|
||||||
|
# run_install: false
|
||||||
|
|
||||||
|
# - name: Install Node.js
|
||||||
|
# uses: actions/setup-node@v3
|
||||||
|
# with:
|
||||||
|
# node-version: 18
|
||||||
|
# cache: pnpm
|
||||||
|
# - run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: 'Setup Rust'
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
targets: ${{ matrix.target }}
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
key: ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Install xattr (macos only)
|
||||||
|
if: matrix.os == 'macos-latest'
|
||||||
|
run: pip install xattr
|
||||||
|
|
||||||
|
- name: Install dependencies (ubuntu only)
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libayatana-appindicator3-dev librsvg2-dev patchelf
|
||||||
|
|
||||||
|
# - name: Build FE
|
||||||
|
# run: pnpm build:fe
|
||||||
|
|
||||||
|
- name: Install rust target
|
||||||
|
run: rustup target add ${{ matrix.target }}
|
||||||
|
|
||||||
|
# - name: fix tray icon
|
||||||
|
# if: matrix.os != 'macos-latest'
|
||||||
|
# run: |
|
||||||
|
# pnpm fix:tray
|
||||||
|
|
||||||
|
- run: cargo build --release --target=${{ matrix.target }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
if: matrix.os == 'ubuntu-latest'
|
||||||
with:
|
with:
|
||||||
RUSTTARGET: ${{ matrix.target }}
|
name: artifacts-${{ matrix.arch }}
|
||||||
ARCHIVE_TYPES: ${{ matrix.archive }}
|
path: |
|
||||||
|
./target/${{ matrix.target }}/release/bundle/appimage/**.AppImage.*
|
||||||
|
./target/${{ matrix.target }}/release/bundle/deb/**.deb
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
if: matrix.os == 'macos-latest'
|
||||||
|
with:
|
||||||
|
name: artifacts-${{ matrix.arch }}
|
||||||
|
path: |
|
||||||
|
./target/${{ matrix.target }}/release/bundle/dmg/**.dmg
|
||||||
|
./target/${{ matrix.target }}/release/bundle/macos/**.app.*
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
with:
|
||||||
|
name: artifacts-${{ matrix.arch }}
|
||||||
|
path: |
|
||||||
|
./target/${{ matrix.target }}/release/bundle/msi/**
|
||||||
|
release-chatgpt:
|
||||||
|
needs: build-chatgpt
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install xattr
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y xattr
|
||||||
|
|
||||||
|
- name: Query version number
|
||||||
|
run: echo "version=${GITHUB_REF:11}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Download x86_64 artifacts
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: artifacts-x86_64
|
||||||
|
path: artifacts/x86_64
|
||||||
|
|
||||||
|
- name: Download aarch64 artifacts
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: artifacts-aarch64
|
||||||
|
path: artifacts/aarch64
|
||||||
|
|
||||||
|
- name: Rename artifacts
|
||||||
|
run: |
|
||||||
|
mv "artifacts/aarch64/dmg/ChatGPT_${{ env.version }}_aarch64.dmg" "artifacts/ChatGPT_${{ env.version }}_macos_aarch64.dmg"
|
||||||
|
mv "artifacts/aarch64/macos/ChatGPT.app.tar.gz" "artifacts/ChatGPT_${{ env.version }}_macos_aarch64.app.tar.gz"
|
||||||
|
mv "artifacts/aarch64/macos/ChatGPT.app.tar.gz.sig" "artifacts/ChatGPT_${{ env.version }}_macos_aarch64.app.tar.gz.sig"
|
||||||
|
|
||||||
|
mv "artifacts/x86_64/dmg/ChatGPT_${{ env.version }}_x64.dmg" "artifacts/ChatGPT_${{ env.version }}_macos_x86_64.dmg"
|
||||||
|
mv "artifacts/x86_64/macos/ChatGPT.app.tar.gz" "artifacts/ChatGPT_${{ env.version }}_macos_x86_64.app.tar.gz"
|
||||||
|
mv "artifacts/x86_64/macos/ChatGPT.app.tar.gz.sig" "artifacts/ChatGPT_${{ env.version }}_macos_x86_64.app.tar.gz.sig"
|
||||||
|
|
||||||
|
mv "artifacts/x86_64/deb/chat-gpt_${{ env.version }}_amd64.deb" "artifacts/x86_64/deb/ChatGPT_${{ env.version }}_linux_x86_64.deb"
|
||||||
|
mv "artifacts/x86_64/appimage/chat-gpt_${{ env.version }}_amd64.AppImage.tar.gz" "artifacts/ChatGPT_${{ env.version }}_linux_x86_64.AppImage.tar.gz"
|
||||||
|
mv "artifacts/x86_64/appimage/chat-gpt_${{ env.version }}_amd64.AppImage.tar.gz.sig" "artifacts/ChatGPT_${{ env.version }}_linux_x86_64.AppImage.tar.gz.sig"
|
||||||
|
|
||||||
|
mv "artifacts/x86_64/ChatGPT_${{ env.version }}_x64_en-US.msi" "artifacts/ChatGPT_${{ env.version }}_windows_x86_64.msi"
|
||||||
|
mv "artifacts/x86_64/ChatGPT_${{ env.version }}_x64_en-US.msi.zip" "artifacts/ChatGPT_${{ env.version }}_windows_x86_64.msi.zip"
|
||||||
|
mv "artifacts/x86_64/ChatGPT_${{ env.version }}_x64_en-US.msi.zip.sig" "artifacts/ChatGPT_${{ env.version }}_windows_x86_64.msi.zip.sig"
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
uses: softprops/action-gh-release@master
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: v${{ env.version }}
|
||||||
|
name: ChatGPT v${{ env.version }}
|
||||||
|
body: See the assets to download this version and install.
|
||||||
|
prerelease: false
|
||||||
|
generate_release_notes: false
|
||||||
|
files: ./artifacts/**/*
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user