Skip to content

Commit 8cdbbd0

Browse files
ci: setup testing and semantic versionning in ci
1 parent bba6624 commit 8cdbbd0

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
permissions:
8+
contents: read # for checkout
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write # to be able to publish a GitHub release
16+
issues: write # to be able to comment on released issues
17+
pull-requests: write # to be able to comment on released pull requests
18+
id-token: write # to enable use of OIDC for npm provenance
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v3
22+
with:
23+
fetch-depth: 0
24+
- name: Set up Go
25+
uses: actions/setup-go@v2
26+
with:
27+
go-version: '1.22.2'
28+
- name: Run tests
29+
run: go test ./...
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v3
32+
with:
33+
node-version: "lts/*"
34+
- name: Install dependencies
35+
run: npm install semantic-release
36+
- name: Release
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+

.releaserc.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
plugins:
2+
- "@semantic-release/commit-analyzer"
3+
- "@semantic-release/release-notes-generator"
4+
- "@semantic-release/github"
5+
branches:
6+
- "master"
7+
- "+([0-9])?(.{+([0-9]),x}).x"
8+
- name: "alpha"
9+
prerelease: "alpha"

0 commit comments

Comments
 (0)