Skip to content

Commit 5559c67

Browse files
authored
Create go.yml
1 parent 3e8cc38 commit 5559c67

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/go.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This workflow will build a golang project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3+
4+
name: Go
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Go
20+
uses: actions/setup-go@v4
21+
with:
22+
go-version: '1.22.2'
23+
24+
- name: Build
25+
run: go build -v ./...
26+
27+
- name: Test
28+
run: go test -v ./...
29+
30+
- name: Upload a Build Artifact
31+
uses: actions/upload-artifact@v4.6.0
32+
with:
33+
# Artifact name
34+
name: build
35+
# A file, directory or wildcard pattern that describes what to upload
36+
path: desktop
37+
# The desired behavior if no files are found using the provided path.
38+

0 commit comments

Comments
 (0)