From 8069333fded87d2fbc3468e8300a8334377c2c8a Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Sat, 11 Apr 2020 13:14:00 -0500 Subject: [PATCH] Add release step. --- .github/workflows/{rust.yml => build.yml} | 2 +- .github/workflows/release.yml | 60 +++++++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) rename .github/workflows/{rust.yml => build.yml} (97%) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/build.yml similarity index 97% rename from .github/workflows/rust.yml rename to .github/workflows/build.yml index 85e1bb5..8ff6553 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Rust +name: Build on: push: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ae15644 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,60 @@ +name: Build + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build_linux: + name: Build Linux + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: | + sudo apt-get update + sudo apt-get install -y libspeechd-dev + cargo build --release --verbose + mv target linux + uses: actions/upload-artifact@v1 + with: + name: linux + path: linux + build_windows: + name: Build Windows + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - run: | + choco install -y llvm + cargo build --release --verbose + move target windows + uses: actions/upload-artifact@v1 + with: + name: windows + path: windows + + package: + name: Package + runs-on: ubuntu-latest + needs: [build_linux, build_windows] + steps: + - uses: actions/checkout@v2 + - uses: actions/download-artifact@v1 + with: + name: linux + - uses: actions/download-artifact@v1 + with: + name: windows + - run: | + mkdir godot-tts + cp godot-tts.gdnlib.release godot-tts/godot-tts.gdnlib + mkdir -p godot-tts/target/release + cp linux/release/*.so godot-tts/target/release + cp windows/release/*.dll godot-tts/target/release + cp LICENSE godot-tts + cp TTS.gd godot-tts.g* godot-tts + cp godot-tts.gdnlib.release godot-tts/godot-tts.gdnlib + rm godot-tts/*.release