You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aya/.github/prep-changelog-config.sh

13 lines
469 B
Bash

#!/bin/bash
# Remove "refs/tags/"
tag="${GITHUB_REF##*/}"
# Extract crate name
crate=$(echo $tag | sed 's/-v[0-9].*//g')
# Semver portion follows after the ${crate}-v
tagPattern="${crate}-v(.+)"
echo ::group::Configuring changelog generator
jq '.tag_resolver.filter.pattern="'$tagPattern'" | .tag_resolver.transformer.pattern="'$tagPattern'" | .categories[].labels += ["'$crate'"]' \
.github/changelog-base.json | tee .github/changelog-config.json
echo ::endgroup::