first alpha release coming

This commit is contained in:
Egor 2025-08-19 12:29:14 -07:00
parent 6668ef30ab
commit 685ba52d11
3 changed files with 54 additions and 19 deletions

View file

@ -1,5 +1,9 @@
name: Release
permissions:
contents: write
actions: read
on:
push:
tags:
@ -96,27 +100,12 @@ jobs:
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
fi
- name: Create Release
- name: Create Draft Release
run: |
gh release create ${{ steps.tag.outputs.tag }} \
--title "FriendlyKobold ${{ steps.tag.outputs.tag }}" \
--notes "## What's New
Release ${{ steps.tag.outputs.tag }} of FriendlyKobold
### Downloads
- **macOS**: Download the \`.dmg\` file
- **Windows**: Download the \`.exe\` installer
- **Linux**: Download the \`.AppImage\` file
### Installation
- **macOS**: Open the \`.dmg\` file and drag FriendlyKobold to Applications
- **Windows**: Run the \`.exe\` installer
- **Linux**: Make the \`.AppImage\` executable and run it
---
For more information, visit our [repository](https://github.com/${{ github.repository }})."
--draft \
--generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -1,7 +1,7 @@
{
"name": "friendly-kobold",
"productName": "Friendly Kobold",
"version": "0.2.0",
"version": "0.3.0",
"description": "A modern Electron shell for KoboldCpp",
"main": "out/main/index.js",
"homepage": "./",
@ -26,6 +26,7 @@
"spell-check": "cspell \"**/*.{ts,tsx,js,jsx,md,json}\" --no-progress",
"spell-check:fix": "cspell \"**/*.{ts,tsx,js,jsx,md,json}\" --no-progress --show-suggestions",
"check-all": "yarn lint && yarn compile && yarn spell-check",
"release": "node scripts/release.js",
"prepare": "husky"
},
"lint-staged": {

45
scripts/release.js Normal file
View file

@ -0,0 +1,45 @@
#!/usr/bin/env node
const { execSync } = require('child_process');
const fs = require('fs');
const path = require('path');
// Read package.json to get current version
const packageJson = JSON.parse(
fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8')
);
const currentVersion = packageJson.version;
console.log(`Creating release for version ${currentVersion}...`);
try {
// Check if we're in a git repository
execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' });
// Check if there are uncommitted changes
const gitStatus = execSync('git status --porcelain', { encoding: 'utf8' });
if (gitStatus.trim() !== '') {
console.error(
'Error: There are uncommitted changes. Please commit or stash them before creating a release.'
);
process.exit(1);
}
// Create and push the tag
const tagName = `v${currentVersion}`;
console.log(`Creating tag ${tagName}...`);
execSync(`git tag ${tagName}`, { stdio: 'inherit' });
console.log(`Pushing tag ${tagName}...`);
execSync(`git push origin ${tagName}`, { stdio: 'inherit' });
console.log(`✅ Release ${tagName} created successfully!`);
console.log(`📦 GitHub Actions will now build and publish the release.`);
console.log(
`🔗 Check the progress at: https://github.com/lone-cloud/friendly-kobold/actions`
);
} catch (error) {
console.error('❌ Error creating release:', error.message);
process.exit(1);
}