diff options
Diffstat (limited to '.github/workflows/create_release.yml')
| -rw-r--r-- | .github/workflows/create_release.yml | 76 |
1 files changed, 66 insertions, 10 deletions
diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 0d6baa193..116026b04 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -8,6 +8,7 @@ on: jobs: bundle-windows: runs-on: [self-hosted, windows, x64] + timeout-minutes: 15 env: VCPKG_VERSION: 2022.03.10 @@ -48,6 +49,7 @@ jobs: bundle-linux: runs-on: [self-hosted, linux, x64] + timeout-minutes: 15 env: VCPKG_VERSION: 2022.03.10 @@ -90,10 +92,57 @@ jobs: with: name: zenserver-linux path: build/zenserver-linux.zip - + + bundle-macos: + runs-on: [self-hosted, macos, x64] + timeout-minutes: 15 + env: + VCPKG_VERSION: 2022.03.10 + + steps: + - uses: actions/checkout@v2 + +# - name: Set up GCC 11 +# uses: egor-tensin/setup-gcc@v1 +# with: +# version: 11 +# platform: x64 + + - name: Setup xmake + uses: xmake-io/github-action-setup-xmake@v1 + with: + xmake-version: 2.6.4 + + - name: Installing vcpkg + run: | + git clone -b ${{env.VCPKG_VERSION}} --single-branch https://github.com/Microsoft/vcpkg.git .vcpkg + cd .vcpkg + ./bootstrap-vcpkg.sh + cd .. + + - name: Cache vcpkg + uses: actions/cache@v2 + with: + path: | + ${{ github.workspace }}/.vcpkg/installed + key: ${{ runner.os }}-release-${{env.VCPKG_VERSION}}-${{ hashFiles('xmake.lua') }}-x64-v5 + + - name: Bundle + run: | + xmake bundle -v -y + env: + VCPKG_ROOT: ${{ github.workspace }}/.vcpkg + + - name: Upload zenserver-macos + uses: actions/upload-artifact@v3 + with: + name: zenserver-macos + path: build/zenserver-macos.zip + create-release: runs-on: [self-hosted, linux, x64] - needs: [bundle-linux, bundle-windows] + timeout-minutes: 5 + needs: [bundle-linux, bundle-windows, bundle-macos] steps: - uses: actions/checkout@v2 @@ -104,20 +153,18 @@ jobs: name: zenserver-linux path: linux + - name: Download MacOS artifacts + uses: actions/download-artifact@v1 + with: + name: zenserver-macos + path: macos + - name: Download Windows artifacts uses: actions/download-artifact@v1 with: name: zenserver-win64 path: win64 - - name: Check prerelease - id: get-prerelease - uses: haya14busa/action-cond@v1 - with: - cond: ${{contains(github.ref, '-pre')}} - if_true: "true" - if_false: "false" - - name: Extract Version Changes run: | sed '1,/^##/!d;/##/d' CHANGELOG.md > CHANGELOG.tmp @@ -134,6 +181,14 @@ jobs: with: path: "VERSION.txt" + - name: Check prerelease + id: get-prerelease + uses: haya14busa/action-cond@v1 + with: + cond: ${{contains(steps.read_version.outputs.contents, '-pre')}} + if_true: "true" + if_false: "false" + - name: Create Release id: create_release uses: softprops/action-gh-release@v1 @@ -148,3 +203,4 @@ jobs: files: | linux/zenserver-linux.zip win64/zenserver-win64.zip + macos/zenserver-macos.zip |