Skip to content

Commit f4510f9

Browse files
update ci/cd, add test workflow
1 parent db43b71 commit f4510f9

2 files changed

Lines changed: 33 additions & 8 deletions

File tree

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
name: Tag Releases
1+
name: Tag release
22

33
on:
44
push:
5-
branches:
6-
- "main"
7-
paths:
8-
- "version.txt"
5+
branches: [main]
6+
paths: [version.txt]
97

10-
# Allows you to run this workflow manually from the Actions tab
118
workflow_dispatch:
129

10+
permissions:
11+
contents: write
12+
1313
jobs:
14-
build:
14+
tag:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v6
19+
1920
- run: |
2021
VERSION="$(cat version.txt)"
2122
git tag "$VERSION"

.github/workflows/test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Run tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v6
17+
with:
18+
persist-credentials: false
19+
20+
- uses: actions/setup-go@v6
21+
with:
22+
go-version-file: go.mod
23+
24+
- run: go test ./...

0 commit comments

Comments
 (0)