Skip to content

Commit 16ff043

Browse files
authored
Merge pull request #93 from xseman/master
ci: add release-please with provenance
2 parents d4b80f9 + ac61d24 commit 16ff043

File tree

3 files changed

+74
-0
lines changed

3 files changed

+74
-0
lines changed

.github/.release-please-manifest.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.7.1"
3+
}

.github/release-please-config.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"packages": {
4+
".": {
5+
"release-type": "node",
6+
"include-v-in-tag": true,
7+
"include-component-in-tag": false,
8+
"pull-request-title-pattern": "v${version}",
9+
"pull-request-header": "",
10+
"pull-request-footer": ""
11+
}
12+
},
13+
"changelog-sections": [
14+
{ "type": "feat", "section": "Features" },
15+
{ "type": "fix", "section": "Bug Fixes" },
16+
{ "type": "perf", "section": "Performance Improvements" },
17+
{ "type": "deps", "section": "Dependency updates" },
18+
{ "type": "docs", "section": "Documentation" },
19+
{ "type": "ci", "section": "Maintenance" },
20+
{ "type": "build", "section": "Maintenance" },
21+
{ "type": "chore", "section": "Maintenance" },
22+
{ "type": "refactor", "section": "Refactors" },
23+
{ "type": "test", "section": "Tests" },
24+
{ "type": "style", "section": "Code Style", "hidden": true },
25+
{ "type": "examples", "section": "Examples", "hidden": true }
26+
]
27+
}

.github/workflows/release-please.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: release-please
2+
3+
on:
4+
workflow_run:
5+
workflows:
6+
- QA
7+
types:
8+
- completed
9+
# manual
10+
workflow_dispatch:
11+
inputs:
12+
publish-release:
13+
description: Publish the release?
14+
required: true
15+
default: "false"
16+
17+
permissions:
18+
contents: write
19+
pull-requests: write
20+
id-token: write
21+
22+
jobs:
23+
release-please:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: googleapis/release-please-action@v4
27+
id: release
28+
with:
29+
manifest-file: .github/.release-please-manifest.json
30+
config-file: .github/release-please-config.json
31+
32+
- if: ${{ github.event.inputs.publish-release == 'true' || steps.release.outputs.release_created }}
33+
uses: actions/checkout@v4
34+
35+
- if: ${{ github.event.inputs.publish-release == 'true' || steps.release.outputs.release_created }}
36+
uses: actions/setup-node@v4
37+
38+
- if: ${{ github.event.inputs.publish-release == 'true' || steps.release.outputs.release_created }}
39+
env:
40+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
run: >
42+
npm ci &&
43+
npm run build &&
44+
npm publish --provenance --access public

0 commit comments

Comments
 (0)