Skip to content

Commit 02bf50b

Browse files
committed
feat(ci): Automate release management
1 parent 9721f34 commit 02bf50b

File tree

4 files changed

+43
-2
lines changed

4 files changed

+43
-2
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,10 @@ jobs:
3737
3838
- name: Build plugin
3939
run: make build
40+
41+
- name: Release
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
run: |
45+
npm install install @semantic-release/git semantic-release
46+
npx semantic-release

.releaserc.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
branch: main
3+
branches:
4+
- main
5+
plugins:
6+
- "@semantic-release/commit-analyzer"
7+
- "@semantic-release/release-notes-generator"
8+
- "@semantic-release/git"
9+
analyzeCommits:
10+
- path: "@semantic-release/commit-analyzer"
11+
releaseRules:
12+
- type: "major"
13+
release: "major"
14+
- type: "breaking"
15+
release: "major"
16+
- type: "minor"
17+
release: "minor"
18+
- type: "feat"
19+
release: "minor"
20+
- type: "patch"
21+
release: "patch"
22+
- type: "fix"
23+
release: "patch"
24+
- type: "chore"
25+
release: "patch"
26+
- type: "no-release"
27+
release: false
28+
publish:
29+
- path: "@semantic-release/github"
30+
assests:
31+
- "dist/**"

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all build build-docker build-splunk-datasource up down
1+
.PHONY: all build build-docker build-splunk-datasource up down release
22

33
SHELL = BASH_ENV=.rc /bin/bash --noprofile
44

@@ -31,3 +31,6 @@ configure-splunk:
3131

3232
down:
3333
-docker-compose down
34+
35+
release:
36+
npx semantic-release

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "efcasado-splunk-datasource",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "",
55
"scripts": {
66
"build": "grafana-toolkit plugin:build",

0 commit comments

Comments
 (0)