Skip to content

Commit b49ea86

Browse files
authored
chore: Configure an initial release process (#2)
This configures Release Please to automatically create new release versions as pull requests are merged.
1 parent b3bf332 commit b49ea86

File tree

4 files changed

+88
-12
lines changed

4 files changed

+88
-12
lines changed

.github/release-config.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"packages": {
4+
".": {
5+
"bump-minor-pre-major": true,
6+
"bump-patch-for-minor-pre-major": false,
7+
"changelog-sections": [
8+
{
9+
"hidden": false,
10+
"section": "New features",
11+
"type": "feat"
12+
},
13+
{
14+
"hidden": false,
15+
"section": "Bug fixes",
16+
"type": "fix"
17+
},
18+
{
19+
"hidden": false,
20+
"section": "Miscellaneous",
21+
"type": "chore"
22+
}
23+
],
24+
"extra-label": "automata 🤖,autorelease: pending,chore 🧹",
25+
"include-v-in-tag": true,
26+
"initial-version": "0.1.0",
27+
"prerelease": true,
28+
"pull-request-header": "🤖 I have created a release",
29+
"pull-request-title-pattern": "chore: Release v${version}",
30+
"release-label": "automata 🤖,autorelease: tagged,chore 🧹",
31+
"release-type": "go"
32+
}
33+
}
34+
}

.github/release-manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

.github/workflows/ci.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- .editorconfig
9+
- .gitignore
10+
- CHANGELOG.md
11+
- LICENSE.md
12+
- README.md
13+
14+
jobs:
15+
verify:
16+
name: Verify
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
- name: Setup Go
22+
uses: actions/setup-go@v5
23+
with:
24+
go-version-file: go.mod
25+
- name: Check formatting
26+
run: test -z "$(go fmt ./...)"
27+
- name: Look for suspicious constructs
28+
run: test -z "$(go vet ./...)"
29+
- name: Run tests
30+
run: go test -v ./...
31+
32+
release:
33+
name: Release?
34+
needs: [ verify ]
35+
permissions:
36+
contents: write
37+
pull-requests: write
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout code
41+
uses: actions/checkout@v4
42+
- name: Prepare a release
43+
id: release
44+
uses: google-github-actions/release-please-action@v4
45+
with:
46+
config-file: .github/release-config.json
47+
manifest-file: .github/release-manifest.json
48+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr.yaml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
paths-ignore:
88
- .editorconfig
99
- .gitignore
10+
- CHANGELOG.md
1011
- LICENSE.md
1112
- README.md
1213

@@ -23,15 +24,7 @@ jobs:
2324
go-version-file: go.mod
2425
- name: Check formatting
2526
run: test -z "$(go fmt ./...)"
26-
27-
build:
28-
name: Build
29-
needs: [ verify ]
30-
runs-on: ubuntu-latest
31-
steps:
32-
- name: Checkout code
33-
uses: actions/checkout@v4
34-
- name: Setup Go
35-
uses: actions/setup-go@v5
36-
with:
37-
go-version-file: go.mod
27+
- name: Look for suspicious constructs
28+
run: test -z "$(go vet ./...)"
29+
- name: Run tests
30+
run: go test -v ./...

0 commit comments

Comments
 (0)