Skip to content

Commit

Permalink
添加 github actions build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuizhubf authored Jul 3, 2023
1 parent 452577c commit 048135a
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 048135a

Please sign in to comment.