-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (44 loc) · 1.3 KB
/
ci.yml
File metadata and controls
50 lines (44 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: CI Pipeline
on:
push:
tags: ["*"]
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs: {}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Golang
uses: actions/setup-go@v6
with:
go-version: "1.25"
- run: go get
- run: go build
- run: go test ./...
release:
needs: build
runs-on: ubuntu-latest
if: github.ref_protected && !startsWith(github.event.head_commit.message, 'chore')
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Semantic Release
run: cp .github/.releaserc.yml .
- uses: cycjimmy/semantic-release-action@v4
with:
extra_plugins: "@semantic-release/exec"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_API: ${{ github.api_url }}