Skip to content

Add fastfetch generator, 256-color slot remapping, and fix delta quoting #9

Add fastfetch generator, 256-color slot remapping, and fix delta quoting

Add fastfetch generator, 256-color slot remapping, and fix delta quoting #9

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for changelog generation
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Update package.json version
run: |
cd packages/vscode-extension
npm version ${{ steps.version.outputs.VERSION }} --no-git-tag-version --allow-same-version
- name: Build all outputs
run: python tools/build.py
- name: Sync changelog to site
run: python tools/sync-changelog.py
- name: Build VS Code extension
run: |
cd packages/vscode-extension
npm install
npx @vscode/vsce package --no-dependencies
mv *.vsix ../../
- name: Package dist
run: |
VERSION=${{ github.ref_name }}
tar -czf human-plus-plus-${VERSION}-dist.tar.gz dist/
zip -r human-plus-plus-${VERSION}-dist.zip dist/
- name: Generate changelog
id: changelog
run: |
# Get previous tag
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
if [ -n "$PREV_TAG" ]; then
echo "Changes since $PREV_TAG:"
CHANGES=$(git log ${PREV_TAG}..HEAD --pretty=format:"- %s" --no-merges)
else
echo "First release"
CHANGES=$(git log --pretty=format:"- %s" --no-merges -20)
fi
# Write changelog to file (handles multiline)
echo "$CHANGES" > changelog-items.txt
- name: Generate release notes
run: |
VERSION=${{ github.ref_name }}
CHANGES=$(cat changelog-items.txt)
cat << EOF > release-notes.md
## Human++ ${VERSION}
A Base24 color scheme for the post-artisanal coding era.
### What's Changed
${CHANGES}
### Install
**VS Code / Cursor:**
Search "Human++" in extensions, or install from CLI:
\`\`\`bash
code --install-extension fielding.human-plus-plus
\`\`\`
Or download the \`.vsix\` below and install manually.
**Other Apps (with tinty):**
\`\`\`bash
tinty apply base24-human-plus-plus
\`\`\`
**Manual:** Download and extract the archive, copy configs to your app's config directory.
### Included Configs
- \`ghostty/config\` - Ghostty terminal
- \`sketchybar/colors.sh\` - Sketchybar
- \`borders/bordersrc\` - JankyBorders
- \`skhd/modes.sh\` - skhd mode indicators
- \`base24/\` - Shell theme and tinty registry
### Links
- [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=fielding.human-plus-plus)
- [Open VSX (Cursor)](https://open-vsx.org/extension/fielding/human-plus-plus)
- [Documentation](https://github.com/fielding/human-plus-plus)
- [Live Preview](https://fielding.github.io/human-plus-plus/)
EOF
- name: Publish to VS Code Marketplace
continue-on-error: true
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: |
if [ -n "$VSCE_PAT" ]; then
cd packages/vscode-extension
npx @vscode/vsce publish --no-dependencies -p "$VSCE_PAT"
else
echo "VSCE_PAT not set, skipping VS Code Marketplace publish"
fi
- name: Publish to Open VSX
continue-on-error: true
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: |
if [ -n "$OVSX_PAT" ]; then
cd packages/vscode-extension
npx ovsx publish --no-dependencies -p "$OVSX_PAT"
else
echo "OVSX_PAT not set, skipping Open VSX publish"
fi
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
body_path: release-notes.md
files: |
human-plus-plus-*.vsix
human-plus-plus-${{ github.ref_name }}-dist.tar.gz
human-plus-plus-${{ github.ref_name }}-dist.zip
- name: Commit updated files
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add templates/site/index.html.tmpl packages/vscode-extension/package.json
git diff --staged --quiet || git commit -m "chore: sync changelog and version for ${{ github.ref_name }}"
git push origin HEAD:main || echo "Nothing to push"