Skip to content

Commit 23417bc

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents b73285c + 61616c7 commit 23417bc

File tree

4 files changed

+257
-0
lines changed

4 files changed

+257
-0
lines changed

.github/workflows/build.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
merge_group:
6+
workflow_dispatch:
7+
8+
jobs:
9+
bump-version:
10+
name: Bump version
11+
runs-on: ubuntu-latest
12+
13+
outputs:
14+
version: ${{ steps.version.outputs.new_version }}
15+
tag: ${{ steps.version.outputs.new_tag }}
16+
changelog: ${{ steps.version.outputs.changelog }}
17+
18+
steps:
19+
- name: bump release version
20+
id: version
21+
uses: mathieudutour/[email protected]
22+
with:
23+
github_token: ${{ github.token }}
24+
default_bump: "minor"
25+
custom_release_rules: "breaking:major:💣 Breaking Changes,feat:minor:✨ Features,fix:patch:💣 Bug Fixes,docs:patch:📰 Docs,chore:patch:🎨 Chore,pref:patch:🎈 Performance improvements,refactor:patch:🧹 Refactoring,build:patch:🔍 Build,ci:patch:🔍 CI,revert:patch:⏪ Revert,style:patch:🧹 Style,test:patch:👀 Test"
26+
dry_run: true
27+
28+
build:
29+
name: Build a binary
30+
strategy:
31+
matrix:
32+
os: [ ubuntu-latest, macos-latest, windows-latest ]
33+
runs-on: ${{ matrix.os }}
34+
needs: bump-version
35+
36+
env:
37+
version: ${{ needs.bump-version.outputs.version }}
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: actions/setup-go@v5
42+
with:
43+
go-version-file: ./go.mod
44+
- name: build
45+
run: |
46+
go build -o ntp-cli-${{ matrix.os }}-v${{ needs.bump-version.outputs.version }}
47+
- name: upload the artifact
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: ntp-cli ${{ env.version }} for ${{ matrix.os }}
51+
path: ./ntp-cli-${{ matrix.os }}-v${{ needs.bump-version.outputs.version }}
52+
overwrite: true

.github/workflows/release.yml

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
bump-version:
11+
name: Bump version
12+
runs-on: ubuntu-latest
13+
14+
outputs:
15+
version: ${{ steps.version.outputs.new_version }}
16+
tag: ${{ steps.version.outputs.new_tag }}
17+
changelog: ${{ steps.version.outputs.changelog }}
18+
19+
steps:
20+
- name: bump release version
21+
id: version
22+
uses: mathieudutour/[email protected]
23+
with:
24+
github_token: ${{ github.token }}
25+
default_bump: "minor"
26+
custom_release_rules: "breaking:major:💣 Breaking Changes,feat:minor:✨ Features,fix:patch:💣 Bug Fixes,docs:patch:📰 Docs,chore:patch:🎨 Chore,pref:patch:🎈 Performance improvements,refactor:patch:🧹 Refactoring,build:patch:🔍 Build,ci:patch:🔍 CI,revert:patch:⏪ Revert,style:patch:🧹 Style,test:patch:👀 Test"
27+
dry_run: true
28+
29+
build:
30+
name: Build a binary
31+
strategy:
32+
matrix:
33+
os: [ ubuntu-latest, macos-latest, windows-latest ]
34+
runs-on: ${{ matrix.os }}
35+
needs: bump-version
36+
37+
env:
38+
version: ${{ needs.bump-version.outputs.version }}
39+
os: ${{ matrix.os }}
40+
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: actions/setup-go@v5
44+
with:
45+
go-version-file: ./go.mod
46+
- name: build
47+
run: |
48+
go build -o ntp-cli-${{ matrix.os }}-v${{ needs.bump-version.outputs.version }}
49+
- name: upload the artifact
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: ntp-cli ${{ env.version }} for ${{ matrix.os }}
53+
path: ./ntp-cli-${{ matrix.os }}-v${{ needs.bump-version.outputs.version }}
54+
overwrite: true
55+
56+
release:
57+
name: Release
58+
runs-on: ubuntu-latest
59+
needs:
60+
- bump-version
61+
- build
62+
63+
steps:
64+
- uses: actions/download-artifact@v4
65+
with:
66+
path: ./binaries
67+
merge-multiple: true
68+
- name: release the artifact
69+
uses: softprops/action-gh-release@v2
70+
with:
71+
body: ${{ needs.bump-version.outputs.changelog }}
72+
tag_name: ${{ needs.bump-version.outputs.tag }}
73+
target_commitish: ${{ github.sha }}
74+
files: |
75+
./binaries/ntp-cli-*

.releaserc

+124
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
{
2+
"branches": [
3+
"main"
4+
],
5+
"plugins": [
6+
[
7+
"@semantic-release/commit-analyzer",
8+
{
9+
"preset": "angular",
10+
"releaseRules": [
11+
{
12+
"type": "breaking",
13+
"release": "major"
14+
},
15+
{
16+
"type": "feat",
17+
"release": "minor"
18+
},
19+
{
20+
"type": "fix",
21+
"release": "patch"
22+
},
23+
{
24+
"type": "docs",
25+
"release": "patch"
26+
},
27+
{
28+
"type": "chore",
29+
"release": "patch"
30+
},
31+
{
32+
"type": "perf",
33+
"release": "patch"
34+
},
35+
{
36+
"type": "refactor",
37+
"release": "patch"
38+
},
39+
{
40+
"type": "build",
41+
"release": "patch"
42+
},
43+
{
44+
"type": "ci",
45+
"release": "patch"
46+
},
47+
{
48+
"type": "revert",
49+
"release": "patch"
50+
},
51+
{
52+
"type": "style",
53+
"release": "patch"
54+
},
55+
{
56+
"type": "test",
57+
"release": "patch"
58+
}
59+
]
60+
}
61+
],
62+
[
63+
"@semantic-release/release-notes-generator",
64+
{
65+
"preset": "conventionalcommits",
66+
"presetConfig": {
67+
"types": [
68+
{
69+
"type": "breaking",
70+
"section": "💣 Breaking Changes"
71+
},
72+
{
73+
"type": "feat",
74+
"section": "✨ Features"
75+
},
76+
{
77+
"type": "fix",
78+
"section": "🛠️ Bug Fixes"
79+
},
80+
{
81+
"type": "docs",
82+
"section": "📃 Docs"
83+
},
84+
{
85+
"type": "chore",
86+
"section": "🎨 Chore"
87+
},
88+
{
89+
"type": "perf",
90+
"section": "🎈 Performance improvements"
91+
},
92+
{
93+
"type": "refactor",
94+
"section": "🧹 Refactoring"
95+
},
96+
{
97+
"type": "build",
98+
"section": "🔍 Build"
99+
},
100+
{
101+
"type": "ci",
102+
"section": "🔍 CI"
103+
},
104+
{
105+
"type": "revert",
106+
"section": "⏪ Revert"
107+
},
108+
{
109+
"type": "style",
110+
"section": "🧹 Style"
111+
},
112+
{
113+
"type": "test",
114+
"section": "👀 Test"
115+
}
116+
]
117+
}
118+
}
119+
],
120+
"@semantic-release/github",
121+
"@semantic-release/git"
122+
],
123+
"dryRun": true
124+
}

renovate.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:recommended"
5+
]
6+
}

0 commit comments

Comments
 (0)