fix: alias 'git tag' to git-tag for releaser
This commit is contained in:
parent
3a3734ecab
commit
7a0e0ab1e7
1 changed files with 1 additions and 28 deletions
29
.github/workflows/build-and-publish.yml
vendored
29
.github/workflows/build-and-publish.yml
vendored
|
@ -50,6 +50,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
apk add git grep yq
|
apk add git grep yq
|
||||||
|
alias git-tag='git tag'
|
||||||
|
|
||||||
# TODO: Bundle all of that logic in a Github Action to make it easy to share.
|
# TODO: Bundle all of that logic in a Github Action to make it easy to share.
|
||||||
for chart_file in ${{ needs.find-charts-to-release.outputs.modified-charts-files }}; do
|
for chart_file in ${{ needs.find-charts-to-release.outputs.modified-charts-files }}; do
|
||||||
|
@ -73,34 +74,6 @@ jobs:
|
||||||
--tag-filter-pattern "${chart_name}" \
|
--tag-filter-pattern "${chart_name}" \
|
||||||
--next-tag "${chart_tag}" \
|
--next-tag "${chart_tag}" \
|
||||||
--path "${chart_path}" "${chart_tag}"
|
--path "${chart_path}" "${chart_tag}"
|
||||||
|
|
||||||
#
|
|
||||||
# Update ArtifactHub "changes" annotation in the Chart.yaml file.
|
|
||||||
# https://artifacthub.io/docs/topics/annotations/helm/#supported-annotations
|
|
||||||
change_types="Added Changed Deprecated Removed Fixed Security"
|
|
||||||
|
|
||||||
# TODO: Rethink about this approach of using bash to generate YAML changes for ArtifactHub,
|
|
||||||
# and find out if there is a better/cleaner way to make it.
|
|
||||||
echo '|' > "${chart_path}/changes-for-artifacthub.yaml"
|
|
||||||
for change_type in ${change_types}; do
|
|
||||||
change_type_section=$(sed -rn "/^\#+\s${change_type}/,/^(#|$)/p" "${chart_path}/RELEASE-NOTES.md")
|
|
||||||
if [[ -n "${change_type_section}" ]]; then
|
|
||||||
echo "${change_type_section}" | egrep '^-' | sed 's/^- //g' | while read commit_message; do
|
|
||||||
echo " - kind: ${change_type,,}"
|
|
||||||
echo " description: \"${commit_message}\""
|
|
||||||
done >> "${chart_path}/changes-for-artifacthub.yaml"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
cat "${chart_path}/changes-for-artifacthub.yaml"
|
|
||||||
|
|
||||||
# Merge changes back to the Chart.yaml file.
|
|
||||||
yq eval-all \
|
|
||||||
'select(fileIndex==0).annotations."artifacthub.io/changes" = select(fileIndex==1) | select(fileIndex==0)' \
|
|
||||||
${chart_path}/Chart.yaml ${chart_path}/changes-for-artifacthub.yaml > \
|
|
||||||
${chart_path}/Chart-with-artifacthub-changes.yaml
|
|
||||||
|
|
||||||
mv ${chart_path}/Chart-with-artifacthub-changes.yaml ${chart_path}/Chart.yaml
|
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Stash generated charts changelog files
|
- name: Stash generated charts changelog files
|
||||||
|
|
Loading…
Reference in a new issue