From 922fa92c06c1b2da0b10c76f82c04db9f2c937ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=B1=B3?= Date: Mon, 8 Jan 2024 23:05:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/DDTV_Dev_CLI.yml | 51 ++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/DDTV_Dev_CLI.yml diff --git a/.github/workflows/DDTV_Dev_CLI.yml b/.github/workflows/DDTV_Dev_CLI.yml new file mode 100644 index 000000000..eb0771b99 --- /dev/null +++ b/.github/workflows/DDTV_Dev_CLI.yml @@ -0,0 +1,51 @@ +name: DDTV_Dev_CLI + +on: + push: + tags: + - "dev*" + pull_request: + branches-ignore: + - master + paths: + - 'CLI/**' + - '.github/workflows/DDTV_Dev_CLI.yml' + - '!**/README.md' + workflow_dispatch: + +jobs: + build: + strategy: + matrix: + include: + - os: ubuntu-latest + runtime: linux-x64 + - os: ubuntu-latest + runtime: linux-arm + - os: windows-latest + runtime: win-x64 + - os: macOS-latest + runtime: osx-arm64 + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Use .NET 8.x + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.x' + + - name: Restore dependencies + run: cd CLI && dotnet restore + + - name: Build + run: cd CLI && dotnet publish --runtime ${{ matrix.runtime }} --configuration Release --self-contained true --output build_output/${{ matrix.runtime }} + + - name: Archive production artifacts + uses: actions/upload-artifact@v4 + with: + name: DDTV-CLI-${{ matrix.os }}-${{ matrix.runtime }} + path: CLI/build_output/${{ matrix.runtime }}