Skip to content

Commit 950342f

Browse files
authored
GitHub actions (#7)
1 parent 45b9ba5 commit 950342f

File tree

3 files changed

+45
-11
lines changed

3 files changed

+45
-11
lines changed

.github/workflows/go.yml

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
name: rke2diff
1+
name: go
2+
23
on:
34
pull_request:
4-
branches: [ "main" ]
5+
branches: ["main"]
56

67
jobs:
78
build:
89
runs-on: ubuntu-latest
910
steps:
10-
- uses: actions/checkout@v4
11-
- name: Set up Go
12-
uses: actions/setup-go@v4
13-
with:
14-
go-version: '1.22.2'
15-
- name: Build
16-
run: go build -v ./...
17-
- name: Test
18-
run: go test -v ./...
11+
- uses: actions/checkout@v4
12+
- name: Set up Go
13+
uses: actions/setup-go@v4
14+
with:
15+
go-version: "1.22.2"
16+
- name: Build
17+
run: go build -v ./...
18+
- name: Test
19+
run: go test -v ./...

.github/workflows/goreleaser.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: goreleaser
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
- name: Set up Go
20+
uses: actions/setup-go@v5
21+
- name: Run GoReleaser
22+
uses: goreleaser/goreleaser-action@v6
23+
with:
24+
distribution: goreleaser
25+
version: "~> v2"
26+
args: release --clean
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.vscode/settings.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"yaml.schemas": {
3+
"https://goreleaser.com/static/schema.json": "file:///home/mikael/Repos/personal/rke2diff/.github/workflows/goreleaser.yml"
4+
}
5+
}

0 commit comments

Comments
 (0)