go-cdn/.github/workflows/go.yml

31 lines
623 B
YAML
Raw Normal View History

2023-06-03 19:35:28 +00:00
# Go Build & Release CI
name: Go Build & Release CI
2023-06-03 16:56:31 +00:00
2023-06-03 19:35:28 +00:00
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
2023-06-03 16:56:31 +00:00
on:
push:
2023-06-03 19:30:42 +00:00
branches:
- main
2023-06-03 16:56:31 +00:00
pull_request:
2023-06-03 19:30:42 +00:00
branches:
- main
2023-06-03 16:56:31 +00:00
jobs:
build:
runs-on: ubuntu-latest
steps:
2023-06-03 19:35:28 +00:00
- name: Checkout
2023-06-03 19:58:53 +00:00
uses: actions/checkout@v3
2023-06-03 19:35:28 +00:00
with:
fetch-depth: 0
- run: git fetch --force --tags
2023-06-03 19:30:42 +00:00
- name: Set up Go
2023-06-03 19:35:28 +00:00
uses: actions/setup-go@v4
2023-06-03 19:30:42 +00:00
with:
2023-06-03 19:35:28 +00:00
go-version: "1.20.x"
cache: true
2023-06-03 16:56:31 +00:00
2023-06-03 19:30:42 +00:00
- name: Build
2023-06-03 19:35:28 +00:00
run: go build -v ./...