From ef350dbde4f9aa04b2f822d69e41c2b7fe9dec12 Mon Sep 17 00:00:00 2001 From: ven Date: Thu, 15 Aug 2024 15:34:53 +0800 Subject: [PATCH] Create Mindoc-Build.yml --- .github/workflows/Mindoc-Build.yml | 55 ++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/Mindoc-Build.yml diff --git a/.github/workflows/Mindoc-Build.yml b/.github/workflows/Mindoc-Build.yml new file mode 100644 index 00000000..82d1dd7b --- /dev/null +++ b/.github/workflows/Mindoc-Build.yml @@ -0,0 +1,55 @@ +name: Mindoc-Build + +on: + workflow_dispatch: + inputs: + version_tag: + description: '请填写版本tag' + required: true + tag: 'latest' # 设置默认的版本tag + +jobs: + build: + name: ${{ matrix.config.name }} + runs-on: ${{ matrix.config.os }} + outputs: + tag: ${{ github.event.inputs.version_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.20.0 + + - 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 }}-${{ github.event.inputs.version_tag }}