mirror of
https://github.com/lone-cloud/gerbil
synced 2026-06-03 19:54:44 -07:00
first alpha release coming
This commit is contained in:
parent
3e7bd83d6f
commit
d04545f5ba
3 changed files with 54 additions and 19 deletions
25
.github/workflows/release.yml
vendored
25
.github/workflows/release.yml
vendored
|
|
@ -1,5 +1,9 @@
|
||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
actions: read
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
|
|
@ -96,27 +100,12 @@ jobs:
|
||||||
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Draft Release
|
||||||
run: |
|
run: |
|
||||||
gh release create ${{ steps.tag.outputs.tag }} \
|
gh release create ${{ steps.tag.outputs.tag }} \
|
||||||
--title "FriendlyKobold ${{ steps.tag.outputs.tag }}" \
|
--title "FriendlyKobold ${{ steps.tag.outputs.tag }}" \
|
||||||
--notes "## What's New
|
--draft \
|
||||||
|
--generate-notes
|
||||||
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 }})."
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "friendly-kobold",
|
"name": "friendly-kobold",
|
||||||
"productName": "Friendly Kobold",
|
"productName": "Friendly Kobold",
|
||||||
"version": "0.2.0",
|
"version": "0.3.0",
|
||||||
"description": "A modern Electron shell for KoboldCpp",
|
"description": "A modern Electron shell for KoboldCpp",
|
||||||
"main": "out/main/index.js",
|
"main": "out/main/index.js",
|
||||||
"homepage": "./",
|
"homepage": "./",
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
"spell-check": "cspell \"**/*.{ts,tsx,js,jsx,md,json}\" --no-progress",
|
"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",
|
"spell-check:fix": "cspell \"**/*.{ts,tsx,js,jsx,md,json}\" --no-progress --show-suggestions",
|
||||||
"check-all": "yarn lint && yarn compile && yarn spell-check",
|
"check-all": "yarn lint && yarn compile && yarn spell-check",
|
||||||
|
"release": "node scripts/release.js",
|
||||||
"prepare": "husky"
|
"prepare": "husky"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
|
|
|
||||||
45
scripts/release.js
Normal file
45
scripts/release.js
Normal 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);
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue