|
| 1 | +name: OKEGui Release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: "[0-9]*" |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + runs-on: windows-latest |
| 11 | + |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v2 |
| 14 | + with: |
| 15 | + submodules: recursive |
| 16 | + |
| 17 | + - name: Setup MSBuild |
| 18 | + uses: microsoft/setup-msbuild@v1 |
| 19 | + |
| 20 | + - name: Setup NuGet |
| 21 | + |
| 22 | + |
| 23 | + - name: Setup Go |
| 24 | + uses: actions/setup-go@v2 |
| 25 | + with: |
| 26 | + go-version: '1.17' |
| 27 | + |
| 28 | + - name: Navigate to Workspace |
| 29 | + run: cd $GITHUB_WORKSPACE |
| 30 | + |
| 31 | + - name: Clone & Build eac3to-wrapper |
| 32 | + shell: bash |
| 33 | + run: | |
| 34 | + git clone https://github.com/AkarinVS/eac3to-wrapper |
| 35 | + cd eac3to-wrapper |
| 36 | + go build -ldflags "-X main.version=$(git describe --tags)" |
| 37 | + cd .. |
| 38 | +
|
| 39 | + - name: Restore Packages |
| 40 | + run: nuget restore OKEGui/OKEGui.sln |
| 41 | + |
| 42 | + - name: Build Solution |
| 43 | + run: | |
| 44 | + msbuild.exe OKEGui/OKEGui.sln /nologo /p:DeleteExistingFiles=True /p:platform="Any CPU" /p:configuration="Release" |
| 45 | +
|
| 46 | + - name: Integrate tools pack from previous release |
| 47 | + shell: bash |
| 48 | + run: | |
| 49 | + set -ex |
| 50 | + curl -s -o tools.zip -L https://github.com/vcb-s/OKEGui/releases/download/7.3/OKEGui_v7.3.zip |
| 51 | + 7z x -otmp tools.zip |
| 52 | + mv tmp/OKEGui/tools "./OKEGui/OKEGui/bin/Release/" |
| 53 | + rm -rf tmp |
| 54 | +
|
| 55 | + - name: Integrate eac3to-wrapper |
| 56 | + shell: bash |
| 57 | + run: | |
| 58 | + mkdir -p "./OKEGui/OKEGui/bin/Release/tools/eac3to" |
| 59 | + cp eac3to-wrapper/eac3to-wrapper.exe "./OKEGui/OKEGui/bin/Release/tools/eac3to" |
| 60 | +
|
| 61 | + - name: Integrate x264 tmod and x265 Yuuki |
| 62 | + shell: bash |
| 63 | + run: | |
| 64 | + set -ex |
| 65 | + mkdir -p "./OKEGui/OKEGui/bin/Release/tools/x26x" |
| 66 | + # |
| 67 | + curl -s -o x264.7z -L https://github.com/jpsdr/x264/releases/download/r3075/x264_tmod_r3075.7z |
| 68 | + 7z x -otmp x264.7z |
| 69 | + cp -a tmp/posix/x264_x64.exe "./OKEGui/OKEGui/bin/Release/tools/x26x/x264.exe" |
| 70 | + rm -rf tmp |
| 71 | + # |
| 72 | + curl -s -o x265.7z -L https://github.com/AmusementClub/x265/releases/download/Yuuki-3.5-AC2/x265-win64-skylake-clang.Yuuki-3.5-AC2.7z |
| 73 | + 7z x -otmp x265.7z |
| 74 | + cp -a tmp/x265.exe "./OKEGui/OKEGui/bin/Release/tools/x26x/x265.exe" |
| 75 | + rm -rf tmp |
| 76 | +
|
| 77 | + - name: Integrate RP-Checker |
| 78 | + shell: bash |
| 79 | + run: | |
| 80 | + set -ex |
| 81 | + mkdir -p "./OKEGui/OKEGui/bin/Release/tools/rpc" |
| 82 | + # |
| 83 | + curl -s -o RPChecker.exe -L https://github.com/vcb-s/rp-checker/releases/download/1.0.6.5/RPChecker.exe |
| 84 | + mv RPChecker.exe "./OKEGui/OKEGui/bin/Release/tools/rpc/" |
| 85 | +
|
| 86 | + - name: Package release |
| 87 | + shell: bash |
| 88 | + run: | |
| 89 | + git clone https://github.com/AkarinVS/exe |
| 90 | + export PATH=`pwd`/exe/:$PATH |
| 91 | + cp -r dist/windows/examples ./OKEGui/OKEGui/bin/Release |
| 92 | + pushd ./OKEGui/OKEGui/bin |
| 93 | + mv Release OKEGui |
| 94 | + zip -9r ../../../"OKEGui-v$(git describe --tags).zip" OKEGui |
| 95 | +
|
| 96 | + - name: Release |
| 97 | + uses: softprops/action-gh-release@v1 |
| 98 | + with: |
| 99 | + files: OKEGui-*.zip |
| 100 | + draft: true |
| 101 | + env: |
| 102 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments