]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Create go.yml
authorqydysky <32743305+qydysky@users.noreply.github.com>
Sun, 4 Oct 2020 10:15:17 +0000 (18:15 +0800)
committerGitHub <noreply@github.com>
Sun, 4 Oct 2020 10:15:17 +0000 (18:15 +0800)
.github/workflows/go.yml [new file with mode: 0644]

diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
new file mode 100644 (file)
index 0000000..20e2e5d
--- /dev/null
@@ -0,0 +1,42 @@
+name: Go
+
+on:
+  release:
+    types: [released,prereleased]
+    branches:
+    - master
+
+jobs:
+
+  build:
+    name: Build
+    runs-on: ubuntu-latest
+    steps:
+
+    - name: Set up Go 1.x
+      uses: actions/setup-go@v2
+      with:
+        go-version: ^1.15.2
+      id: go
+
+    - name: Check out code into the Go module directory
+      uses: actions/checkout@v2
+
+    - name: Get dependencies
+      run: |
+        go get -v -t -d ./...
+        if [ -f Gopkg.toml ]; then
+            curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
+            dep ensure
+        fi
+
+    - name: Build
+      run: go build -v .
+      
+    - name: Upload a Build Artifact
+      uses: actions/upload-artifact@v2.2.0
+      with:
+        # Artifact name
+        # A file, directory or wildcard pattern that describes what to upload
+        path: ./
+        # The desired behavior if no files are found using the provided path.