From 048135a2d9cce1b8d9c7943c3b9b06809d51b0e0 Mon Sep 17 00:00:00 2001 From: zhuizhubf <48177673+zhuizhubf@users.noreply.github.com> Date: Mon, 3 Jul 2023 09:29:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20github=20actions=20build.y?= =?UTF-8?q?ml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..45202c0c6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,53 @@ +name: Go + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + name: ${{ matrix.config.name }} + runs-on: ${{ matrix.config.os }} + outputs: + tag: ${{ steps.git.outputs.tag }} + strategy: + fail-fast: false + matrix: + config: + - { + name: "Windows Latest MSVC", + artifact: "windows", + os: windows-latest + } + - { + name: "Ubuntu Latest GCC", + artifact: "linux", + os: ubuntu-latest + } + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.18 + + - name: Build + run: | + go mod tidy + go build -v + + # - name: Test + # run: go test -v ./... + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + path: | + conf/**/* + static/**/* + views/**/* + mindoc.* + name: mindoc-${{ matrix.config.artifact }}-${{ steps.git.outputs.tag }}.7z