Skip to content
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d560931
Rebuild `home_valueXX_icon_color` engine
edwardtfn Feb 4, 2026
da2f5ca
Merge branch 'main' into v9999.99.9
edwardtfn Feb 4, 2026
1f253dd
Use valid Jinja expression in value color/icon guards
edwardtfn Feb 4, 2026
5f25295
Automatic versioning
edwardtfn Feb 5, 2026
78e5b32
style: auto-fix markdown lint issues
edwardtfn Feb 5, 2026
3c30041
Potential fix for code scanning alert no. 28: Workflow does not conta…
edwardtfn Feb 5, 2026
42c8521
Fix file reference
edwardtfn Feb 5, 2026
106ca39
Merge branch 'v9999.99.9' of https://github.com/edwardtfn/NSPanel-Eas…
edwardtfn Feb 5, 2026
f1e686c
style: auto-fix markdown lint issues
edwardtfn Feb 5, 2026
4e01343
Merge branch 'main' into v9999.99.9
edwardtfn Feb 5, 2026
7d0f7e8
Avoid force‑pushing all tags
edwardtfn Feb 5, 2026
b54bb88
Merge branch 'v9999.99.9' of https://github.com/edwardtfn/NSPanel-Eas…
edwardtfn Feb 5, 2026
bfb5eab
Clarify tag backups
edwardtfn Feb 5, 2026
38ad27d
active voice for clarity
edwardtfn Feb 5, 2026
5c4b6fc
Fix command injection vulnerability in tag message generation: quote …
edwardtfn Feb 5, 2026
be60f3d
Remove documentation describes temp branch workflow that doesn't exist
edwardtfn Feb 5, 2026
253845d
📝 CodeRabbit Chat: Add unit tests
coderabbitai[bot] Feb 5, 2026
ac9b218
lint
edwardtfn Feb 5, 2026
2ee0d20
Add Sponsor via GitHub
edwardtfn Feb 5, 2026
8993d54
Merge branch 'v9999.99.9' of https://github.com/edwardtfn/NSPanel-Eas…
edwardtfn Feb 5, 2026
a00e8e0
Fix start/end markers
edwardtfn Feb 5, 2026
9dde51d
Update .test/unit/test_versioning_advanced.py
edwardtfn Feb 5, 2026
2205fbe
Hardcoded absolute paths will break portability
edwardtfn Feb 5, 2026
9d25f35
Update .test/unit/test_versioning.py
edwardtfn Feb 5, 2026
6b68fb9
Merge branch 'v9999.99.9' of https://github.com/edwardtfn/NSPanel-Eas…
edwardtfn Feb 5, 2026
00666b7
Update .test/unit/test_versioning.py
edwardtfn Feb 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# These are supported funding model platforms

---
buy_me_a_coffee: edwardfirmo
github: edwardtfn
liberapay: edwardtfn
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
...
189 changes: 189 additions & 0 deletions .github/workflows/versioning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
# This GitHub Actions workflow handles version bumping and tag updates.
# It can be triggered either by:
# 1. Pushing to main branch - automatically bumps version and updates tags
# 2. Manual dispatch - allows independent control over stable and latest tags

---
name: Version and Tags

on: # yamllint disable-line rule:truthy
push:
branches:
- main
paths-ignore:
- '**/VERSION'
- '**/VERSION_YAML'

workflow_dispatch:
inputs:
update_stable:
description: "Update stable tag?"
required: true
default: false
type: boolean
update_latest:
description: "Update latest tag?"
required: true
default: false
type: boolean

jobs:
version-and-tag:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Git
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"

- name: Get PR information
id: pr_info
if: github.event_name == 'push'
uses: actions/github-script@v7
with:
script: |
try {
// Use GitHub's reliable API to find PRs associated with this commit
const { data: associatedPRs } = await github.rest.repos.listPullRequestsAssociatedWithCommit({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: context.sha
});

if (associatedPRs.length > 0) {
// Get the most recent merged PR
const pr = associatedPRs.find(pr => pr.state === 'closed' && pr.merged_at) || associatedPRs[0];

return {
title: pr.title,
body: pr.body || 'No description provided',
number: pr.number,
found: true
};
} else {
// Fallback for direct pushes or when no PR is found
const commit = await github.rest.repos.getCommit({
owner: context.repo.owner,
repo: context.repo.repo,
ref: context.sha
});

return {
title: 'Direct push to main',
body: commit.data.commit.message,
number: null,
found: false
};
}
} catch (error) {
console.log('Could not get PR info:', error.message);
return {
title: 'Version update',
body: 'Automated version bump',
number: null,
found: false
};
}

- name: Bump version
run: |
chmod +x ./versioning/bump_version.sh
./versioning/bump_version.sh

- name: Create tag message
id: tag_message
env:
PR_TITLE: ${{ github.event_name == 'push' && steps.pr_info.outcome == 'success' && fromJson(steps.pr_info.outputs.result).title || '' }}
PR_BODY: ${{ github.event_name == 'push' && steps.pr_info.outcome == 'success' && fromJson(steps.pr_info.outputs.result).body || '' }}
run: |
NEW_VERSION=$(cat ./versioning/VERSION)

if [ "${{ github.event_name }}" == "push" ] && [ "${{ steps.pr_info.outcome }}" == "success" ]; then
{
printf '# v%s - %s\n\n' "$NEW_VERSION" "$PR_TITLE"
printf '%s\n' "$PR_BODY"
} > tag_message.txt
else
# Manual dispatch or PR info unavailable - simpler message
cat > tag_message.txt << EOF
# v${NEW_VERSION} - Manual tag update

Tag updated via manual workflow dispatch.
EOF
fi

# Store the message for use in subsequent steps
echo "TAG_MESSAGE_FILE=tag_message.txt" >> $GITHUB_ENV

- name: Push Changes and Tags
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
NEW_VERSION=$(cat ./versioning/VERSION)
git push origin main
git push origin "v${NEW_VERSION}"

- name: Update stable tag
if: |
success() && (
github.event_name == 'workflow_dispatch' && inputs.update_stable ||
github.event_name == 'push'
)
run: |
# Verify version bump was successful
if [ ! -f "./versioning/VERSION" ]; then
echo "Error: VERSION file not found. Version bump may have failed."
exit 1
fi

# Capture existing tag SHA for logging
if git rev-parse --verify stable >/dev/null 2>&1; then
OLD_STABLE=$(git rev-parse stable)
echo "Backing up current stable tag ($OLD_STABLE)"
fi

# Update tag with detailed message
NEW_VERSION=$(cat ./versioning/VERSION)
echo "Updating stable tag to $NEW_VERSION"
git tag -fa stable -F "$TAG_MESSAGE_FILE"
git push origin stable --force

- name: Update latest tag
if: |
success() && (
github.event_name == 'workflow_dispatch' && inputs.update_latest ||
github.event_name == 'push'
)
run: |
# Verify version bump was successful
if [ ! -f "./versioning/VERSION" ]; then
echo "Error: VERSION file not found. Version bump may have failed."
exit 1
fi

# Capture existing tag SHA for logging
if git rev-parse --verify latest >/dev/null 2>&1; then
OLD_LATEST=$(git rev-parse latest)
echo "Backing up current latest tag ($OLD_LATEST)"
fi

# Update tag with detailed message
NEW_VERSION=$(cat ./versioning/VERSION)
echo "Updating latest tag to $NEW_VERSION"
git tag -fa latest -F "$TAG_MESSAGE_FILE"
git push origin latest --force

- name: Cleanup
if: always()
run: |
# Clean up temporary files
[ -f tag_message.txt ] && rm tag_message.txt || true
...
Empty file.
Loading