From 48bead337245d34736d6a10d28eb09d8fc465e3b Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 17 Oct 2023 00:36:07 +0200 Subject: [PATCH] ci: fix releases and add linkcheck (#71) --- .chglog/CHANGELOG.tpl.md | 23 ----------------- .chglog/config.yml | 25 ------------------- .dictionary | 1 - .gitsv/config.yml | 47 +++++++++++++++++++++++++++++++++++ .woodpecker/build-package.yml | 16 +++++------- .woodpecker/test.yml | 8 ------ README.md | 1 - 7 files changed, 53 insertions(+), 68 deletions(-) delete mode 100755 .chglog/CHANGELOG.tpl.md delete mode 100755 .chglog/config.yml create mode 100644 .gitsv/config.yml diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md deleted file mode 100755 index b79faa8..0000000 --- a/.chglog/CHANGELOG.tpl.md +++ /dev/null @@ -1,23 +0,0 @@ -# Changelog - -{{ range .Versions -}} -## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }}) - -{{ range .CommitGroups -}} -### {{ .Title }} - -{{ range .Commits -}} -- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ (regexReplaceAll "(.*)/issues/(.*)" (regexReplaceAll "(Co-\\w*-by.*)" .Subject "") "${1}/pull/${2}") | trim }} -{{ end }} -{{- end -}} - -{{- if .NoteGroups -}} -{{ range .NoteGroups -}} -### {{ .Title }} - -{{ range .Notes }} -{{ .Body }} -{{ end }} -{{ end -}} -{{ end -}} -{{ end -}} diff --git a/.chglog/config.yml b/.chglog/config.yml deleted file mode 100755 index 884dea8..0000000 --- a/.chglog/config.yml +++ /dev/null @@ -1,25 +0,0 @@ -style: github -template: CHANGELOG.tpl.md -info: - title: CHANGELOG - repository_url: https://github.com/thegeeklab/url-parser -options: - commit_groups: - title_maps: - feat: Features - fix: Bug Fixes - perf: Performance Improvements - refactor: Code Refactoring - chore: Others - test: Testing - ci: CI Pipeline - docs: Documentation - header: - pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$" - pattern_maps: - - Type - - Scope - - Subject - notes: - keywords: - - BREAKING CHANGE diff --git a/.dictionary b/.dictionary index cbe55b2..71ea522 100644 --- a/.dictionary +++ b/.dictionary @@ -1,5 +1,4 @@ url-parser -Codecov herloct multiarch (P|p)rebuilt diff --git a/.gitsv/config.yml b/.gitsv/config.yml new file mode 100644 index 0000000..7b9cae5 --- /dev/null +++ b/.gitsv/config.yml @@ -0,0 +1,47 @@ +--- +version: "1.1" + +versioning: + update-major: [] + update-minor: [feat] + update-patch: [fix, perf, refactor, chore, test, ci, docs] + +tag: + pattern: "v%d.%d.%d" + +release-notes: + sections: + - name: Features + commit-types: [feat] + section-type: commits + - name: Bug Fixes + commit-types: [fix] + section-type: commits + - name: Performance Improvements + commit-types: [perf] + section-type: commits + - name: Code Refactoring + commit-types: [refactor] + section-type: commits + - name: Others + commit-types: [chore] + section-type: commits + - name: Testing + commit-types: [test] + section-type: commits + - name: CI Pipeline + commit-types: [ci] + section-type: commits + - name: Documentation + commit-types: [docs] + section-type: commits + - name: Breaking Changes + section-type: breaking-changes + +commit-message: + footer: + issue: + key: issue + add-value-prefix: "#" + issue: + regex: "#?[0-9]+" diff --git a/.woodpecker/build-package.yml b/.woodpecker/build-package.yml index f6de3f2..2a08e27 100644 --- a/.woodpecker/build-package.yml +++ b/.woodpecker/build-package.yml @@ -17,17 +17,13 @@ steps: commands: - $(find dist/ -executable -type f -iname ${CI_REPO_NAME}-linux-amd64) --help - changelog-generate: - image: quay.io/thegeeklab/git-chglog + changelog: + image: quay.io/thegeeklab/git-sv commands: - - git fetch -tq - - git-chglog --no-color --no-emoji -o CHANGELOG.md ${CI_COMMIT_TAG:---next-tag unreleased unreleased} - - changelog-format: - image: quay.io/thegeeklab/alpine-tools - commands: - - prettier CHANGELOG.md - - prettier -w CHANGELOG.md + - git fetch --depth=2147483647 + - git sv current-version + - git sv release-notes + - git sv release-notes -o CHANGELOG.md publish-github: image: docker.io/plugins/github-release diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index e9589d8..abd3763 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -15,11 +15,3 @@ steps: image: docker.io/library/golang:1.21 commands: - make test - - # coverage: - # image: docker.io/plugins/codecov - # settings: - # files: - # - coverage.out - # token: - # from_secret: codecov_token diff --git a/README.md b/README.md index 9e5fa01..4635150 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ Simple command-line URL parser [![Build Status](https://ci.thegeeklab.de/api/badges/thegeeklab/url-parser/status.svg)](https://ci.thegeeklab.de/repos/thegeeklab/url-parser) [![Go Report Card](https://goreportcard.com/badge/github.com/thegeeklab/url-parser)](https://goreportcard.com/report/github.com/thegeeklab/url-parser) -[![Codecov](https://img.shields.io/codecov/c/github/thegeeklab/url-parser)](https://codecov.io/gh/thegeeklab/url-parser) [![GitHub contributors](https://img.shields.io/github/contributors/thegeeklab/url-parser)](https://github.com/thegeeklab/url-parser/graphs/contributors) [![License: MIT](https://img.shields.io/github/license/thegeeklab/url-parser)](https://github.com/thegeeklab/url-parser/blob/main/LICENSE)