Skip to content

Commit cdff28e

Browse files
committed
ci: add release-please for automated versioning and releases
Conventional commits on main will auto-create a release PR with changelog and version bump. Merging the PR creates a GitHub release which triggers the existing publish.yml NuGet workflow.
1 parent 417b7e6 commit cdff28e

3 files changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
env:
9+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
10+
11+
jobs:
12+
release-please:
13+
name: Release Please
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
steps:
19+
- uses: googleapis/release-please-action@v4
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
release-type: simple
23+
package-name: E4A.PostGuard

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.1.1"
3+
}

release-please-config.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"packages": {
3+
".": {
4+
"release-type": "simple",
5+
"package-name": "E4A.PostGuard",
6+
"extra-files": [
7+
{
8+
"type": "xml",
9+
"path": "src/E4A.PostGuard.csproj",
10+
"xpath": "//Project/PropertyGroup/Version"
11+
}
12+
],
13+
"changelog-path": "CHANGELOG.md"
14+
}
15+
},
16+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
17+
}

0 commit comments

Comments
 (0)