ci(init): add initial CI configuration
All checks were successful
ci/woodpecker/pr/test Pipeline was successful

This commit is contained in:
Piotr Icikowski 2023-11-04 20:37:00 +01:00
parent 61db20e91c
commit adbb987cbd
Signed by: Piotr Icikowski
GPG Key ID: 3931CA47A91F7666
6 changed files with 7429 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.vscode/*
node_modules/*

152
.releaserc.json Normal file
View File

@ -0,0 +1,152 @@
{
"branches": [
{
"name": "main",
"channel": "stable",
"prerelease": false
},
{
"name": "devel",
"channel": "rc",
"prerelease": "rc"
}
],
"plugins": [
[
"@semantic-release/commit-analyzer", {
"preset": "conventionalcommits",
"releaseRules": [
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "docs",
"release": false
},
{
"type": "style",
"release": false
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "perf",
"release": "minor"
},
{
"type": "test",
"release": "patch"
},
{
"type": "build",
"release": "patch"
},
{
"type": "ci",
"release": "patch"
},
{
"type": "revert",
"release": "patch"
},
{
"type": "release",
"release": false
}
],
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES"]
}
}
],
[
"@semantic-release/release-notes-generator", {
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features",
"hidden": false
},
{
"type": "fix",
"section": "Bug Fixes",
"hidden": false
},
{
"type": "docs",
"hidden": true
},
{
"type": "refactor",
"section": "Refactoring",
"hidden": false
},
{
"type": "perf",
"section": "Performance Improvements",
"hidden": false
},
{
"type": "test",
"section": " Tests",
"hidden": false
},
{
"type": "ci",
"section": "Continuous Integrations",
"hidden": false
},
{
"type": "chore",
"hidden": true
},
{
"type": "revert",
"section": "Reverts",
"hidden": false
},
{
"type": "release",
"hidden": true
},
{
"type": "build",
"section": "Build system and dependencies",
"hidden": false
}
]
}
}
],
[
"@semantic-release/changelog", {
"changelogFile": "CHANGELOG.md"
}
],
[
"@semantic-release/npm", {
"npmPublish": false
}
],
["@saithodev/semantic-release-gitea", {
"giteaUrl": "https://git.ext.icikowski.pl"
}],
[
"@semantic-release/git", {
"assets": ["CHANGELOG.md","package.json", "package-lock.json"],
"message": "release(${nextRelease.channel}): v${nextRelease.version}\n\n${nextRelease.notes}"
}
]
],
"preset": "conventionalcommits"
}

13
.woodpecker/.release.yml Normal file
View File

@ -0,0 +1,13 @@
when:
- event: push
evaluate: '(CI_COMMIT_BRANCH == "devel" && not (CI_COMMIT_MESSAGE startsWith "release")) || (CI_COMMIT_BRANCH == "main" && not (CI_COMMIT_MESSAGE startsWith "release(stable)"))'
steps:
semantic-release:
image: node:latest
secrets:
- gitea_token
- git_credentials
commands:
- npm i
- npm run release

11
.woodpecker/.test.yml Normal file
View File

@ -0,0 +1,11 @@
when:
- event: [push, pull_request]
branch: devel
evaluate: 'not (CI_COMMIT_MESSAGE startsWith "release")'
steps:
test:
group: test
image: golang:1.21-alpine
commands:
- go test -v ./...

7233
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

18
package.json Normal file
View File

@ -0,0 +1,18 @@
{
"private": true,
"name": "collections",
"version": "0.1.0",
"scripts": {
"release": "./node_modules/.bin/semantic-release"
},
"devDependencies": {
"@saithodev/semantic-release-gitea": "^2.1.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^11.0.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/npm": "^11.0.1",
"@semantic-release/release-notes-generator": "^12.0.1",
"conventional-changelog-conventionalcommits": "^7.0.2",
"semantic-release": "^22.0.7"
}
}