From 4a81941bfd4973b21d3ae653054165ebd750aef3 Mon Sep 17 00:00:00 2001 From: Kevin Kandlbinder Date: Tue, 6 Sep 2022 00:29:48 +0200 Subject: [PATCH] Update go.yml Signed-off-by: Kevin Kandlbinder --- .github/workflows/go.yml | 42 ++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index bf74345..e54f183 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -7,9 +7,30 @@ on: branches: [ main ] jobs: - - build: + build-webui: + name: Build WebUI runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: "18.x" + - run: yarn + name: WebUI - Install Dependencies + working-directory: webui + - run: yarn build + name: WebUI - Build + working-directory: webui + - name: WebUI - Upload artifact + uses: actions/upload-artifact@v3 + with: + name: webui-dist + path: webui/build + + build-backend: + runs-on: ubuntu-latest + needs: build-webui steps: - uses: actions/checkout@v2 @@ -17,19 +38,12 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.17 - - - name: Use Node.js - uses: actions/setup-node@v3 + + - name: Download WebUI build + uses: actions/download-artifact@v3 with: - node-version: "18.x" - - - run: yarn - name: WebUI - Install Dependencies - working-directory: webui - - - run: yarn build - name: WebUI - Build - working-directory: webui + name: webui-dist + path: webui/build - name: Build with WebUI run: go build -tags withUI -v ./...