mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-06-17 06:27:35 +00:00
ci(release): add daily automated version bump and changelog workflow
Add version-bump.yml: daily git-cliff semver bump on dev (version files, uv.lock, prepended CHANGELOG entry, tag). Switch release.yml gate to compare against latest GitHub release instead of latest tag, since every bump is now tagged. Allow .github/ through the hidden-dir gitignore rule.
This commit is contained in:
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -23,15 +23,17 @@ jobs:
|
||||
|
||||
- name: Check for major/minor version bump
|
||||
id: version_check
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
NEW_VERSION=$(grep -m1 '^version' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
|
||||
echo "Detected version in pyproject.toml: $NEW_VERSION"
|
||||
|
||||
LATEST_TAG=$(git tag --list | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -1)
|
||||
echo "Latest git tag: $LATEST_TAG"
|
||||
LATEST_TAG=$(gh release list --limit 1 --json tagName -q '.[0].tagName' || true)
|
||||
echo "Latest GitHub release: $LATEST_TAG"
|
||||
|
||||
if [ -z "$LATEST_TAG" ]; then
|
||||
echo "No previous tag found, treating as new release"
|
||||
echo "No previous release found, treating as new release"
|
||||
echo "should_release=true" >> "$GITHUB_OUTPUT"
|
||||
echo "new_version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user