@@ -0,0 +1,17 @@
|
|||||||
|
name: Go Build with Cache
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: 检出代码
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: 设置 Go 并缓存
|
||||||
|
uses: magnetikonline/action-golang-cache@v4
|
||||||
|
with:
|
||||||
|
go-version-file: go.mod
|
||||||
|
|
||||||
|
- name: 编译
|
||||||
|
run: go build -o myapp .
|
||||||
Reference in New Issue
Block a user