Skip to content

Commit f604e34

Browse files
committed
fix: GHA - release: add missing package.json and releaserc.json
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
1 parent 26bc035 commit f604e34

File tree

1 file changed

+56
-1
lines changed

1 file changed

+56
-1
lines changed

.github/workflows/release.yaml

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,62 @@ jobs:
178178
- uses: actions/checkout@v4
179179
- uses: actions/setup-node@v4
180180
with:
181-
node-version: "21.4.0"
181+
node-version: "lts/*"
182+
- name: Write package.json
183+
uses: DamianReeves/write-file-action@master
184+
with:
185+
path: ./package.json
186+
write-mode: overwrite
187+
contents: |
188+
{
189+
"name": "${{ env.APP_NAME }}",
190+
"version": "1.0.0",
191+
"devDependencies": {
192+
"semantic-release-export-data": "^1.0.1",
193+
"@semantic-release/changelog": "^6.0.3"
194+
}
195+
}
196+
- name: Write .releaserc.json
197+
uses: DamianReeves/write-file-action@master
198+
with:
199+
path: ./.releaserc.json
200+
write-mode: overwrite
201+
contents: |
202+
{
203+
"branches": "release",
204+
"repositoryUrl": "https://github.com/netboxlabs/diode-sdk-python",
205+
"debug": "true",
206+
"tagFormat": "v${version}",
207+
"plugins": [
208+
["semantic-release-export-data"],
209+
["@semantic-release/commit-analyzer", {
210+
"releaseRules": [
211+
{ "message": "*", "release": "patch"},
212+
{ "message": "fix*", "release": "patch" },
213+
{ "message": "feat*", "release": "minor" },
214+
{ "message": "perf*", "release": "major" }
215+
]
216+
}],
217+
"@semantic-release/release-notes-generator",
218+
[
219+
"@semantic-release/changelog",
220+
{
221+
"changelogFile": "CHANGELOG.md",
222+
"changelogTitle": "# Semantic Versioning Changelog"
223+
}
224+
],
225+
[
226+
"@semantic-release/github",
227+
{
228+
"assets": [
229+
{
230+
"path": "release/**"
231+
}
232+
]
233+
}
234+
]
235+
]
236+
}
182237
- name: setup semantic-release
183238
run: npm i
184239
- name: Release

0 commit comments

Comments
 (0)