godot-tts/.github/workflows/release.yml

226 lines
6.1 KiB
YAML
Raw Normal View History

2020-04-11 18:33:50 +00:00
name: Release
2020-04-11 18:14:00 +00:00
on:
push:
2020-04-12 01:57:06 +00:00
tags:
- "v*"
2020-04-11 18:14:00 +00:00
jobs:
build_linux:
name: Build Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2020-11-17 19:12:28 +00:00
- uses: Swatinem/rust-cache@v1
- run: |
sudo apt-get update
sudo apt-get install -y libspeechd-dev
cargo build --release
2023-03-18 15:43:44 +00:00
mkdir linux
mv target/release/*.so linux
- uses: actions/upload-artifact@v1
with:
name: linux
path: linux
2020-04-11 18:15:48 +00:00
2023-03-18 15:43:44 +00:00
build_linux_32:
name: Build Linux (32 bits)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y libspeechd-dev:i386 gcc-multilib
rustup target add i686-unknown-linux-gnu
cargo build --release --target i686-unknown-linux-gnu
mkdir linux-32
mv target/i686-unknown-linux-gnu/release/*.so linux-32
- uses: actions/upload-artifact@v1
with:
name: linux-32
path: linux-32
2020-04-11 18:14:00 +00:00
build_windows:
name: Build Windows
runs-on: windows-latest
env:
LIBCLANG_PATH: c:\program files\llvm\bin
2020-04-11 18:14:00 +00:00
steps:
- uses: actions/checkout@v2
2020-11-17 19:12:28 +00:00
- uses: Swatinem/rust-cache@v1
- run: |
2020-11-17 19:17:17 +00:00
choco install -qy llvm
2022-12-16 16:46:29 +00:00
cargo build --release
2023-03-18 15:43:44 +00:00
mkdir windows
move target\release\*.dll windows
- uses: actions/upload-artifact@v1
with:
name: windows
path: windows
2023-03-18 15:43:44 +00:00
build_windows_32:
name: Build Windows (32 bits)
runs-on: windows-latest
env:
LIBCLANG_PATH: c:\program files\llvm\bin
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- run: |
choco install -qy llvm
rustup target add i686-pc-windows-msvc
cargo build --release --target i686-pc-windows-msvc
mkdir windows-32
move target\i686-pc-windows-msvc\release\*.dll windows-32
- uses: actions/upload-artifact@v1
with:
name: windows-32
path: windows-32
2020-10-09 01:28:19 +00:00
build_uwp:
name: Build UWP
runs-on: windows-latest
env:
LIBCLANG_PATH: c:\program files\llvm\bin
2020-10-09 01:28:19 +00:00
steps:
- uses: actions/checkout@v2
2020-11-17 19:12:28 +00:00
- uses: Swatinem/rust-cache@v1
2020-10-09 01:28:19 +00:00
- run: |
choco install -y llvm
cargo build --release
2023-03-18 15:43:44 +00:00
mkdir uwp
move target\release\godot_tts.dll uwp\godot_tts.uwp.dll
2020-10-09 01:28:19 +00:00
- uses: actions/upload-artifact@v1
with:
name: uwp
path: uwp
build_macos:
name: Build MacOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
2020-11-17 19:12:28 +00:00
- uses: Swatinem/rust-cache@v1
- run: |
cargo build --release
2023-03-18 15:43:44 +00:00
mkdir macos
mv target/release/*.dylib macos
- uses: actions/upload-artifact@v1
with:
name: macos
path: macos
2020-04-11 18:14:00 +00:00
build_android:
name: Build Android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
lfs: true
- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- run: |
./gradlew assemble
mv build android
- uses: actions/upload-artifact@v1
with:
name: android
path: android
build_ios:
name: Build iOS
2020-08-18 20:59:27 +00:00
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
2020-11-17 19:12:28 +00:00
- uses: Swatinem/rust-cache@v1
2020-08-18 20:59:27 +00:00
- run: |
rustup target add aarch64-apple-ios x86_64-apple-ios
cargo install cargo-lipo
cargo lipo --release
2023-03-18 15:43:44 +00:00
mkdir ios
mv target/universal/release/*.a ios
2020-08-18 20:59:27 +00:00
- uses: actions/upload-artifact@v1
with:
name: ios
path: ios
2020-04-11 18:14:00 +00:00
package:
name: Package
runs-on: ubuntu-latest
2020-10-09 01:28:19 +00:00
needs:
[
build_linux,
2023-03-18 15:43:44 +00:00
build_linux_32,
2020-10-09 01:28:19 +00:00
build_windows,
2023-03-18 15:43:44 +00:00
build_windows_32,
2020-10-09 01:28:19 +00:00
build_uwp,
build_macos,
build_android,
build_ios,
]
2020-04-11 18:14:00 +00:00
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v1
with:
name: linux
2023-03-18 15:43:44 +00:00
- uses: actions/download-artifact@v1
with:
name: linux-32
- uses: actions/download-artifact@v1
with:
name: windows
2023-03-18 15:43:44 +00:00
- uses: actions/download-artifact@v1
with:
name: windows-32
2020-10-09 01:28:19 +00:00
- uses: actions/download-artifact@v1
with:
name: uwp
- uses: actions/download-artifact@v1
with:
name: macos
- uses: actions/download-artifact@v1
with:
name: android
2020-08-18 20:59:27 +00:00
- uses: actions/download-artifact@v1
with:
name: ios
- run: |
2023-03-18 15:43:44 +00:00
mkdir -p godot-tts/target/release/32
cp linux/*.so godot-tts/target/release
cp linux-32/*.so godot-tts/target/release/32
cp windows/*.dll godot-tts/target/release
cp windows-32/*.dll godot-tts/target/release/32
cp uwp/*.dll godot-tts/target/release
cp macos/*.dylib godot-tts/target/release
2020-08-18 16:02:02 +00:00
cp android/outputs/aar/godot-tts.aar godot-tts/
2023-03-18 15:43:44 +00:00
cp ios/*.a godot-tts/target/release
cp LICENSE godot-tts
cp README.md godot-tts
cp TTS.gd godot-tts.g* godot-tts
rm godot-tts/*.gdnlib
mv godot-tts/godot-tts.gdnlib.release godot-tts/godot-tts.gdnlib
zip -r9 godot-tts godot-tts
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- uses: actions/upload-release-asset@v1
id: upload-release-asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./godot-tts.zip
asset_name: godot-tts.zip
asset_content_type: application/zip