diff --git a/.gitea/ISSUE_TEMPLATE.yml b/.gitea/ISSUE_TEMPLATE.yml index 6d80569..9c57285 100644 --- a/.gitea/ISSUE_TEMPLATE.yml +++ b/.gitea/ISSUE_TEMPLATE.yml @@ -10,7 +10,7 @@ body: id: content attributes: label: ❔ What happened - description: Simply ask your question here. + description: Simply ask your question here. placeholder: Tell us what you want to know... validations: required: true diff --git a/.gitea/ISSUE_TEMPLATE/Question.yml b/.gitea/ISSUE_TEMPLATE/Question.yml index bb4f083..7f1ad38 100644 --- a/.gitea/ISSUE_TEMPLATE/Question.yml +++ b/.gitea/ISSUE_TEMPLATE/Question.yml @@ -12,7 +12,7 @@ body: id: content attributes: label: ❔ What happened - description: Simply ask your question here. + description: Simply ask your question here. placeholder: Tell us what you want to know... validations: required: true diff --git a/.gitea/PULL_REQUEST_TEMPLATE.yml b/.gitea/PULL_REQUEST_TEMPLATE.yml index 2e743b7..8bf1185 100644 --- a/.gitea/PULL_REQUEST_TEMPLATE.yml +++ b/.gitea/PULL_REQUEST_TEMPLATE.yml @@ -1,6 +1,6 @@ name: Pull Request about: General pull request -title: "" +title: '' body: - type: markdown attributes: diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..3867e6d --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json.schemastore.org/prettierrc", + "arrowParens": "always", + "bracketSpacing": true, + "printWidth": 116, + "semi": false, + "singleQuote": true, + "trailingComma": "all", + "vueIndentScriptAndStyle": true +} diff --git a/.vscode/settings.json b/.vscode/settings.json index fb63d46..e6dfdb2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,9 +6,7 @@ "editor.renderWhitespace": "boundary", "editor.formatOnSave": true, "editor.formatOnType": true, - "editor.rulers": [ - 116 - ], + "editor.rulers": [116], // cSpell settings for custom dictionary "cSpell.enabled": true, "cSpell.caseSensitive": false, @@ -55,8 +53,12 @@ "custom": true }, "[markdown]": { - "editor.defaultFormatter": "DavidAnson.vscode-markdownlint", - "editor.formatOnSave": true, - "editor.formatOnPaste": true, + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[json]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[jsonc]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" } } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 3271576..8aab441 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -2,37 +2,37 @@ "version": "2.0.0", "tasks": [ { - "label": "Update GiteaChangelog", - "type": "shell", - "command": [ - "mv 'CHANGELOG.md' 'CHANGELOG.back' &&", - "echo '' > CHANGELOG.md &&", - "changelog -m '${input:Milestone}' --token '${input:GiteaToken}' -c .changelog.yml generate >> CHANGELOG.md &&", - "echo '' >> CHANGELOG.md &&", - "cat CHANGELOG.back >> CHANGELOG.md &&", - "rm CHANGELOG.back" - ], - "problemMatcher": [] + "label": "Update GiteaChangelog", + "type": "shell", + "command": [ + "mv 'CHANGELOG.md' 'CHANGELOG.back' &&", + "echo '' > CHANGELOG.md &&", + "changelog -m '${input:Milestone}' --token '${input:GiteaToken}' -c .changelog.yml generate >> CHANGELOG.md &&", + "echo '' >> CHANGELOG.md &&", + "cat CHANGELOG.back >> CHANGELOG.md &&", + "rm CHANGELOG.back" + ], + "problemMatcher": [] } ], "inputs": [ { - "id": "GiteaToken", - "type": "command", - "command": "shellCommand.execute", - "args": { - "command": "echo $GITEA_TOKEN", - "description": "Your personal Gitea access token" - } + "id": "GiteaToken", + "type": "command", + "command": "shellCommand.execute", + "args": { + "command": "echo $GITEA_TOKEN", + "description": "Your personal Gitea access token" + } }, { - "id": "Milestone", - "type": "command", - "command": "shellCommand.execute", - "args": { - "description": "Select or enter a open milestone", - "command": "tea milestone ls -f title --output simple" - } + "id": "Milestone", + "type": "command", + "command": "shellCommand.execute", + "args": { + "description": "Select or enter a open milestone", + "command": "tea milestone ls -f title --output simple" + } } ] } diff --git a/.woodpecker/ci.yml b/.woodpecker/ci.yml index 3a7cd61..9ec1e45 100644 --- a/.woodpecker/ci.yml +++ b/.woodpecker/ci.yml @@ -11,19 +11,18 @@ variables: - &publish_repos 'ocram85/plugin-gitea-package,gitea.ocram85.com/plugins/gitea-package' #- &publish_repos 'gitea.ocram85.com/plugins/gitea-package' # logins for deployment targets - - publish_logins: &publish_logins - # Default DockerHub login - - registry: https://index.docker.io/v1/ - username: - from_secret: docker_user - password: - from_secret: docker_passwd - # Additional Gitea login - - registry: https://gitea.ocram85.com - username: - from_secret: gitea_user - password: - from_secret: gitea_passwd + - publish_logins: &publish_logins # Default DockerHub login + - registry: https://index.docker.io/v1/ + username: + from_secret: docker_user + password: + from_secret: docker_passwd + # Additional Gitea login + - registry: https://gitea.ocram85.com + username: + from_secret: gitea_user + password: + from_secret: gitea_passwd steps: lint-dockerfile: @@ -35,18 +34,23 @@ steps: #when: # path: "Dockerfile" - lint-markdown: - image: davidanson/markdownlint-cli2:v0.17.1 - commands: - - "markdownlint-cli2 *.{md,markdown}" - when: - path: "*.{md,markdown}" + #lint-markdown: + # image: davidanson/markdownlint-cli2:v0.17.1 + # commands: + # - "markdownlint-cli2 *.{md,markdown}" + # when: + # path: "*.{md,markdown}" lint-editorconfig: depends_on: [] - image: docker.io/mstruebing/editorconfig-checker:v3.1.2 - when: - event: pull_request + image: woodpeckerci/plugin-editorconfig-checker:latest + pull: true + settings: + verbose: true + + lint-prettier: + depends_on: [] + image: woodpeckerci/plugin-prettier:1.3.0 test: image: *build_plugin @@ -100,7 +104,7 @@ steps: from_secret: RENOVATE_TOKEN base_url: https://gitea.ocram85.com title: ${CI_COMMIT_TAG} - note: "> :bulb: **Note:** See [CHANGELOG.md](src/branch/master/CHANGELOG.md) for recent changes." + note: '> :bulb: **Note:** See [CHANGELOG.md](src/branch/master/CHANGELOG.md) for recent changes.' when: event: [tag] branch: ${CI_REPO_DEFAULT_BRANCH} diff --git a/.woodpecker/release-hepler.yml b/.woodpecker/release-hepler.yml new file mode 100644 index 0000000..5952a58 --- /dev/null +++ b/.woodpecker/release-hepler.yml @@ -0,0 +1,19 @@ +depends_on: + - ci + - test-image + +when: + - event: push + branch: + - ${CI_REPO_DEFAULT_BRANCH} + - event: manual + evaluate: TASK == "release-helper" + +steps: + release-helper: + image: woodpeckerci/plugin-ready-release-go:3.1.3 + settings: + debug: true + git_email: noreply@ocram85.com + forge_token: + from_secret: ci_token diff --git a/.woodpecker/test-image.yml b/.woodpecker/test-image.yml index f3804a0..75aea6f 100644 --- a/.woodpecker/test-image.yml +++ b/.woodpecker/test-image.yml @@ -4,23 +4,22 @@ when: branch: - ${CI_REPO_DEFAULT_BRANCH} - variables: - &build_plugin 'gitea.ocram85.com/plugins/gitea-package:next' - &default_settings - user: - from_secret: gitea_user - password: - from_secret: gitea_passwd - owner: "plugins" - package_name: "dummy_package" - package_version: "0.1.0" - file_source: "./README.md" - file_name: "readme.md" - #update: "true" + user: + from_secret: gitea_user + password: + from_secret: gitea_passwd + owner: 'plugins' + package_name: 'dummy_package' + package_version: '0.1.0' + file_source: './README.md' + file_name: 'readme.md' + #update: "true" depends_on: - - "ci" + - ci steps: default: @@ -28,7 +27,7 @@ steps: pull: true settings: <<: *default_settings - update: "true" + update: 'true' when: event: pull_request branch: ${CI_REPO_DEFAULT_BRANCH} @@ -38,8 +37,8 @@ steps: pull: true settings: <<: *default_settings - update: "true" - debug: "true" + update: 'true' + debug: 'true' when: event: pull_request branch: ${CI_REPO_DEFAULT_BRANCH} @@ -50,7 +49,7 @@ steps: failure: ignore settings: <<: *default_settings - debug: "true" + debug: 'true' when: event: pull_request branch: ${CI_REPO_DEFAULT_BRANCH} diff --git a/CHANGELOG.md b/CHANGELOG.md index f77c63b..c97578a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,44 +1,49 @@ + ## [v0.3.1](https://gitea.ocram85.com/plugins/gitea-package/releases/tag/v0.3.1) - 2025-01-17 -* 🤖 DEPENDENCIES - * Chore(deps): update docker.io/mstruebing/editorconfig-checker docker tag to v3.1.2 (#22) - * Chore(deps): update davidanson/markdownlint-cli2 docker tag to v0.17.1 (#21) - * Chore(deps): update woodpeckerci/plugin-docker-buildx docker tag to v5 (#20) - * Chore(deps): update curlimages/curl docker tag to v8.11.1 (#19) +- 🤖 DEPENDENCIES + - Chore(deps): update docker.io/mstruebing/editorconfig-checker docker tag to v3.1.2 (#22) + - Chore(deps): update davidanson/markdownlint-cli2 docker tag to v0.17.1 (#21) + - Chore(deps): update woodpeckerci/plugin-docker-buildx docker tag to v5 (#20) + - Chore(deps): update curlimages/curl docker tag to v8.11.1 (#19) + ## [v0.3.0](https://gitea.ocram85.com/plugins/gitea-package/releases/tag/v0.3.0) - 2024-09-09 -* 🤖 DEPENDENCIES - * Chore(deps): update davidanson/markdownlint-cli2 docker tag to v0.14.0 (#17) - * Chore(deps): update curlimages/curl docker tag to v8.9.1 (#16) - * Chore(deps): update woodpeckerci/plugin-docker-buildx docker tag to v4.2.0 (#15) +- 🤖 DEPENDENCIES + - Chore(deps): update davidanson/markdownlint-cli2 docker tag to v0.14.0 (#17) + - Chore(deps): update curlimages/curl docker tag to v8.9.1 (#16) + - Chore(deps): update woodpeckerci/plugin-docker-buildx docker tag to v4.2.0 (#15) + ## [v0.2.0](https://gitea.ocram85.com/plugins/gitea-package/releases/tag/v0.2.0) - 2024-07-09 -* 🤖 DEPENDENCIES - * Chore(deps): update docker.io/mstruebing/editorconfig-checker docker tag to v3.0.3 (#13) - * Chore(deps): update curlimages/curl docker tag to v8.8.0 (#12) +- 🤖 DEPENDENCIES + - Chore(deps): update docker.io/mstruebing/editorconfig-checker docker tag to v3.0.3 (#13) + - Chore(deps): update curlimages/curl docker tag to v8.8.0 (#12) + ## [v0.1.1](https://gitea.ocram85.com/plugins/gitea-package/releases/tag/v0.1.1) - 2024-05-17 -* 🛠️ ENHANCEMENTS - * Extend text output (#10) -* 📦 BUILD - * Add linter + renovate (#6) -* 🤖 DEPENDENCIES - * Chore(deps): update woodpeckerci/plugin-docker-buildx docker tag to v4 (#8) +- 🛠️ ENHANCEMENTS + - Extend text output (#10) +- 📦 BUILD + - Add linter + renovate (#6) +- 🤖 DEPENDENCIES + - Chore(deps): update woodpeckerci/plugin-docker-buildx docker tag to v4 (#8) + ## [v0.1.0](https://gitea.ocram85.com/plugins/gitea-package/releases/tag/v0.1.0) - 2024-05-14 -* 🐛 BUGFIXES - * Fix logo size (#4) -* ✨ FEATURES - * Add upload command (#3) - * Migrate content (#1) -* ⚙️ META - * Update Gitea meta files (#2) +- 🐛 BUGFIXES + - Fix logo size (#4) +- ✨ FEATURES + - Add upload command (#3) + - Migrate content (#1) +- ⚙️ META + - Update Gitea meta files (#2) diff --git a/docs.md b/docs.md index 3720bf0..735d0f5 100644 --- a/docs.md +++ b/docs.md @@ -17,17 +17,17 @@ For details about the features and limits of the _Generic Package Registry_ thei ## Settings -| Settings Name | Default | Description | -| ------------- | ------- | ------------------------- | -| `user` | _none_ | Gitea user for basic auth | -| `password` | _none_ | Password for basic auth | -| `debug` | _none_ | Enables debug output if it's set to `true`. | -| `owner` | _none_ | Package owner | -| `package_name` | _none_ | The package name | -| `package_version` | _none_ | Package version | -| `file_source` | _none_ | File source path for upload. | -| `file_name` | _none_ | Package file name | -| `update` | `false` | Allow update existing package files | +| Settings Name | Default | Description | +| ----------------- | ------- | ------------------------------------------- | +| `user` | _none_ | Gitea user for basic auth | +| `password` | _none_ | Password for basic auth | +| `debug` | _none_ | Enables debug output if it's set to `true`. | +| `owner` | _none_ | Package owner | +| `package_name` | _none_ | The package name | +| `package_version` | _none_ | Package version | +| `file_source` | _none_ | File source path for upload. | +| `file_name` | _none_ | Package file name | +| `update` | `false` | Allow update existing package files | ## Examples @@ -39,25 +39,25 @@ when: - ${CI_REPO_DEFAULT_BRANCH} depends_on: - - "ci" + - 'ci' steps: next: image: ocram85/plugin-gitea-package:latest pull: true - secrets: [ gitea_user, gitea_passwd] + secrets: [gitea_user, gitea_passwd] settings: user: from_secret: gitea_user password: from_secret: gitea_passwd - debug: "true" - owner: "plugins" - package_name: "dummy_package" - package_version: "0.1.0" - file_source: "./README.md" - file_name: "readme.md" - update: "true" + debug: 'true' + owner: 'plugins' + package_name: 'dummy_package' + package_version: '0.1.0' + file_source: './README.md' + file_name: 'readme.md' + update: 'true' when: event: pull_request branch: ${CI_REPO_DEFAULT_BRANCH} diff --git a/release-conifg.ts b/release-conifg.ts new file mode 100644 index 0000000..bb05998 --- /dev/null +++ b/release-conifg.ts @@ -0,0 +1,67 @@ +export default { + skipLabels: [ + // FIXME: ignoring a label prevents processing the full PR! + //'build_pr_images', + // ignore issue labels + 'duplicate', + 'help wanted', + 'invalid', + 'question', + 'wontfix', + ], + changeTypes: [ + { + title: '💥 Breaking changes', + labels: ['breaking'], + bump: 'major', + weight: 4, + }, + { + title: '✨ Features', + labels: ['feature'], + bump: 'minor', + weight: 3, + }, + { + title: '🛠️ Enhancement', + labels: ['enhancement'], + bump: 'minor', + weight: 2, + }, + { + title: '🐛 Bug Fixes', + labels: ['bug'], + bump: 'patch', + weight: 1, + }, + { + title: '🤖 Dependency', + labels: ['renovate', 'dependency'], + bump: 'patch', + }, + { + title: '📚 Documentation', + labels: ['docs'], + bump: 'patch', + }, + { + title: '📦 Build', + labels: ['pipeline'], + bump: 'patch', + weight: -1, + }, + { + title: '⚙️ Meta', + labels: ['meta'], + bump: 'patch', + weight: -2, + }, + { + title: '🔖 Misc', + labels: ['misc'], + bump: 'patch', + default: true, + weight: -3, + }, + ], +} diff --git a/renovate.json b/renovate.json index aa311e2..5643db3 100644 --- a/renovate.json +++ b/renovate.json @@ -5,8 +5,6 @@ }, "woodpecker": { "enabled": true, - "fileMatch": [ - "^.woodpecker\/.*.yml$" - ] + "fileMatch": ["^.woodpecker\/.*.yml$"] } }