8 Commits

Author SHA1 Message Date
6bb1a30f37 1.2.3
All checks were successful
Release / build-and-release (push) Successful in 39s
2025-10-24 09:54:58 +00:00
d6f9346e49 fix(deps): Update Deno dependencies and configuration, commit lockfile, and adjust plugins exports 2025-10-24 09:54:58 +00:00
750ac4a47b 1.2.2
Some checks failed
Release / build-and-release (push) Failing after 4s
2025-10-24 08:21:13 +00:00
8119ff264c fix(logging): Refactor logging and plugin imports: remove push.rocks dependencies and provide a simple console-based logger with a compatibility shim 2025-10-24 08:21:13 +00:00
33ee422f39 1.2.1
Some checks failed
Release / build-and-release (push) Failing after 5s
2025-10-24 08:17:12 +00:00
571f3e72f8 fix(deno): Set Deno nodeModulesDir to auto and add local .claude settings 2025-10-24 08:17:12 +00:00
593a17d875 1.2.0
Some checks failed
Release / build-and-release (push) Failing after 4s
2025-10-24 08:13:50 +00:00
aadd42b2c6 feat(ci): Improve release workflow: compile multi-platform binaries, generate checksums, create Gitea release and upload assets, and add local settings 2025-10-24 08:13:50 +00:00
9 changed files with 353 additions and 156 deletions

View File

@@ -6,146 +6,244 @@ on:
- 'v*' - 'v*'
jobs: jobs:
release: build-and-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Deno - name: Set up Deno
uses: denoland/setup-deno@v1 uses: denoland/setup-deno@v1
with: with:
deno-version: v1.x deno-version: v2.x
- name: Verify version matches tag - name: Get version from tag
id: version
run: | run: |
TAG_VERSION=${GITHUB_REF#refs/tags/v} VERSION=${GITHUB_REF#refs/tags/}
DENO_VERSION=$(grep '"version"' deno.json | head -1 | sed 's/.*"version": "\(.*\)".*/\1/') echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "version_number=${VERSION#v}" >> $GITHUB_OUTPUT
echo "Building version: $VERSION"
echo "Git tag version: $TAG_VERSION" - name: Verify deno.json version matches tag
run: |
DENO_VERSION=$(grep -o '"version": "[^"]*"' deno.json | cut -d'"' -f4)
TAG_VERSION="${{ steps.version.outputs.version_number }}"
echo "deno.json version: $DENO_VERSION" echo "deno.json version: $DENO_VERSION"
echo "Tag version: $TAG_VERSION"
if [ "$TAG_VERSION" != "$DENO_VERSION" ]; then if [ "$DENO_VERSION" != "$TAG_VERSION" ]; then
echo " Version mismatch!" echo "ERROR: Version mismatch!"
echo "Git tag: v$TAG_VERSION" echo "deno.json has version $DENO_VERSION but tag is $TAG_VERSION"
echo "deno.json: $DENO_VERSION"
exit 1 exit 1
fi fi
echo "✅ Versions match: $TAG_VERSION" - name: Compile binaries for all platforms
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.cache/deno
key: deno-${{ hashFiles('deno.lock') }}
- name: Install dependencies
run: deno cache --reload mod.ts
- name: Run tests
run: deno task test
- name: Compile binaries
run: | run: |
bash scripts/compile-all.sh echo "================================================"
echo " isocreator Release Compilation"
echo " Version: ${{ steps.version.outputs.version }}"
echo "================================================"
echo ""
- name: Generate checksums # Clean up old binaries and create fresh directory
rm -rf dist/binaries
mkdir -p dist/binaries
echo "→ Cleaned old binaries from dist/binaries"
echo ""
# Linux x86_64
echo "→ Compiling for Linux x86_64..."
deno compile --allow-all --no-check \
--output dist/binaries/isocreator-linux-x64 \
--target x86_64-unknown-linux-gnu mod.ts
echo " ✓ Linux x86_64 complete"
# Linux ARM64
echo "→ Compiling for Linux ARM64..."
deno compile --allow-all --no-check \
--output dist/binaries/isocreator-linux-arm64 \
--target aarch64-unknown-linux-gnu mod.ts
echo " ✓ Linux ARM64 complete"
# macOS x86_64
echo "→ Compiling for macOS x86_64..."
deno compile --allow-all --no-check \
--output dist/binaries/isocreator-macos-x64 \
--target x86_64-apple-darwin mod.ts
echo " ✓ macOS x86_64 complete"
# macOS ARM64
echo "→ Compiling for macOS ARM64..."
deno compile --allow-all --no-check \
--output dist/binaries/isocreator-macos-arm64 \
--target aarch64-apple-darwin mod.ts
echo " ✓ macOS ARM64 complete"
# Windows x86_64
echo "→ Compiling for Windows x86_64..."
deno compile --allow-all --no-check \
--output dist/binaries/isocreator-windows-x64.exe \
--target x86_64-pc-windows-msvc mod.ts
echo " ✓ Windows x86_64 complete"
echo ""
echo "All binaries compiled successfully!"
ls -lh dist/binaries/
- name: Generate SHA256 checksums
run: | run: |
cd dist/binaries cd dist/binaries
sha256sum * > checksums.txt sha256sum * > SHA256SUMS.txt
cat checksums.txt cat SHA256SUMS.txt
cd ../..
- name: Extract changelog - name: Extract changelog for this version
id: changelog id: changelog
run: | run: |
TAG_VERSION=${GITHUB_REF#refs/tags/v} VERSION="${{ steps.version.outputs.version }}"
# Extract changelog section for this version # Check if changelog.md exists
CHANGELOG=$(awk "/## \[$TAG_VERSION\]/,/## \[/" changelog.md | sed '1d;$d') if [ ! -f changelog.md ]; then
echo "No changelog.md found, using default release notes"
cat > /tmp/release_notes.md << EOF
## isocreator $VERSION
if [ -z "$CHANGELOG" ]; then Pre-compiled binaries for multiple platforms.
echo "No changelog entry found for version $TAG_VERSION"
CHANGELOG="Release version $TAG_VERSION" ### Installation
Use the installation script:
\`\`\`bash
curl -sSL https://code.foss.global/serve.zone/isocreator/raw/branch/main/install.sh | sudo bash
\`\`\`
Or download the binary for your platform and make it executable.
### Supported Platforms
- Linux x86_64 (x64)
- Linux ARM64 (aarch64)
- macOS x86_64 (Intel)
- macOS ARM64 (Apple Silicon)
- Windows x86_64
### Checksums
SHA256 checksums are provided in SHA256SUMS.txt
EOF
else
# Try to extract section for this version from changelog.md
# This is a simple extraction - adjust based on your changelog format
awk "/## \[$VERSION\]/,/## \[/" changelog.md | sed '$d' > /tmp/release_notes.md || cat > /tmp/release_notes.md << EOF
## isocreator $VERSION
See changelog.md for full details.
### Installation
Use the installation script:
\`\`\`bash
curl -sSL https://code.foss.global/serve.zone/isocreator/raw/branch/main/install.sh | sudo bash
\`\`\`
EOF
fi fi
# Save to file for release notes echo "Release notes:"
echo "$CHANGELOG" > /tmp/release-notes.md cat /tmp/release_notes.md
cat /tmp/release-notes.md
- name: Create Release - name: Delete existing release if it exists
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref_name }}
body_path: /tmp/release-notes.md
draft: false
prerelease: false
- name: Upload Linux x64 Binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/binaries/isocreator-linux-x64
asset_name: isocreator-linux-x64
asset_content_type: application/octet-stream
- name: Upload Linux ARM64 Binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/binaries/isocreator-linux-arm64
asset_name: isocreator-linux-arm64
asset_content_type: application/octet-stream
- name: Upload macOS x64 Binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/binaries/isocreator-macos-x64
asset_name: isocreator-macos-x64
asset_content_type: application/octet-stream
- name: Upload macOS ARM64 Binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/binaries/isocreator-macos-arm64
asset_name: isocreator-macos-arm64
asset_content_type: application/octet-stream
- name: Upload Windows x64 Binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/binaries/isocreator-windows-x64.exe
asset_name: isocreator-windows-x64.exe
asset_content_type: application/octet-stream
- name: Upload Checksums
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/binaries/checksums.txt
asset_name: checksums.txt
asset_content_type: text/plain
- name: Clean old releases
run: | run: |
echo "Keeping only the last 3 releases..." VERSION="${{ steps.version.outputs.version }}"
# This would require gitea API calls - implement if needed
echo "Checking for existing release $VERSION..."
# Try to get existing release by tag
EXISTING_RELEASE_ID=$(curl -s \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://code.foss.global/api/v1/repos/serve.zone/isocreator/releases/tags/$VERSION" \
| jq -r '.id // empty')
if [ -n "$EXISTING_RELEASE_ID" ]; then
echo "Found existing release (ID: $EXISTING_RELEASE_ID), deleting..."
curl -X DELETE -s \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://code.foss.global/api/v1/repos/serve.zone/isocreator/releases/$EXISTING_RELEASE_ID"
echo "Existing release deleted"
sleep 2
else
echo "No existing release found, proceeding with creation"
fi
- name: Create Gitea Release
run: |
VERSION="${{ steps.version.outputs.version }}"
RELEASE_NOTES=$(cat /tmp/release_notes.md)
# Create the release
echo "Creating release for $VERSION..."
RELEASE_ID=$(curl -X POST -s \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/json" \
"https://code.foss.global/api/v1/repos/serve.zone/isocreator/releases" \
-d "{
\"tag_name\": \"$VERSION\",
\"name\": \"isocreator $VERSION\",
\"body\": $(jq -Rs . /tmp/release_notes.md),
\"draft\": false,
\"prerelease\": false
}" | jq -r '.id')
echo "Release created with ID: $RELEASE_ID"
# Upload binaries as release assets
for binary in dist/binaries/*; do
filename=$(basename "$binary")
echo "Uploading $filename..."
curl -X POST -s \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary "@$binary" \
"https://code.foss.global/api/v1/repos/serve.zone/isocreator/releases/$RELEASE_ID/assets?name=$filename"
done
echo "All assets uploaded successfully"
- name: Clean up old releases
run: |
echo "Cleaning up old releases (keeping only last 3)..."
# Fetch all releases sorted by creation date
RELEASES=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://code.foss.global/api/v1/repos/serve.zone/isocreator/releases" | \
jq -r 'sort_by(.created_at) | reverse | .[3:] | .[].id')
# Delete old releases
if [ -n "$RELEASES" ]; then
echo "Found releases to delete:"
for release_id in $RELEASES; do
echo " Deleting release ID: $release_id"
curl -X DELETE -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://code.foss.global/api/v1/repos/serve.zone/isocreator/releases/$release_id"
done
echo "Old releases deleted successfully"
else
echo "No old releases to delete (less than 4 releases total)"
fi
echo ""
- name: Release Summary
run: |
echo "================================================"
echo " Release ${{ steps.version.outputs.version }} Complete!"
echo "================================================"
echo ""
echo "Binaries published:"
ls -lh dist/binaries/
echo ""
echo "Release URL:"
echo "https://code.foss.global/serve.zone/isocreator/releases/tag/${{ steps.version.outputs.version }}"
echo ""
echo "Installation command:"
echo "curl -sSL https://code.foss.global/serve.zone/isocreator/raw/branch/main/install.sh | sudo bash"
echo ""

2
.gitignore vendored
View File

@@ -1,6 +1,6 @@
# Deno # Deno
.deno/ .deno/
deno.lock # deno.lock should be committed for reproducible builds
# Node # Node
node_modules/ node_modules/

View File

@@ -1,5 +1,41 @@
# Changelog # Changelog
## 2025-10-24 - 1.2.3 - fix(deps)
Update Deno dependencies and configuration, commit lockfile, and adjust plugins exports
- Add deno.lock with pinned std library versions for reproducible Deno builds
- Remove deno.lock from .gitignore so the lockfile is committed
- Remove unused @std/fmt export from ts/plugins.ts and from deno.json imports
- Adjust deno.json compiler options (remove allowJs)
- Add local .claude/settings.local.json (local permissions/config)
## 2025-10-24 - 1.2.2 - fix(logging)
Refactor logging and plugin imports: remove push.rocks dependencies and provide a simple console-based logger with a compatibility shim
- Replaced smartlog-based logger with a simple console-based log utility in ts/logging.ts; added a small logger shim (logger.log) for compatibility.
- Removed push.rocks exports from ts/plugins.ts and consolidated external imports to std modules (@std/*); updated deno.json to remove push.rocks packages and keep @std/cli.
- Updated code to use the new console logger and simplified plugin surface; this reduces external dependencies and simplifies runtime footprint.
- Added .claude/settings.local.json (local settings file) — development/local config only, no runtime change.
## 2025-10-24 - 1.2.1 - fix(deno)
Set Deno nodeModulesDir to 'auto' and add local .claude settings
- Add nodeModulesDir: "auto" to deno.json to enable automatic node_modules handling for compatibility with npm-scoped imports.
- Add .claude/settings.local.json with local tooling permissions for development environments (non-functional, local config only).
- This is a tooling/config change only — no runtime code paths were modified.
## 2025-10-24 - 1.2.0 - feat(ci)
Improve release workflow: compile multi-platform binaries, generate checksums, create Gitea release and upload assets, and add local settings
- Rename workflow job to build-and-release and set up Deno v2
- Verify deno.json version matches the Git tag before building
- Compile pre-built binaries for Linux (x64, arm64), macOS (x64, arm64) and Windows (x64)
- Generate SHA256 checksums (SHA256SUMS.txt) for all compiled binaries
- Extract or generate release notes and create a Gitea release via API
- Upload compiled binaries and checksums as release assets
- Delete existing release if present and clean up old releases (keep last 3)
- Add local .claude/settings.local.json for developer environment permissions
## 2025-10-24 - 1.1.0 - feat(core) ## 2025-10-24 - 1.1.0 - feat(core)
Initial project scaffold and implementation: Deno CLI, ISO tooling, cloud-init generation, packaging and installer scripts Initial project scaffold and implementation: Deno CLI, ISO tooling, cloud-init generation, packaging and installer scripts

View File

@@ -1,6 +1,6 @@
{ {
"name": "@serve.zone/isocreator", "name": "@serve.zone/isocreator",
"version": "1.1.0", "version": "1.2.3",
"exports": "./mod.ts", "exports": "./mod.ts",
"tasks": { "tasks": {
"dev": "deno run --allow-all mod.ts", "dev": "deno run --allow-all mod.ts",
@@ -18,19 +18,14 @@
"@std/fs": "jsr:@std/fs@^1.0.0", "@std/fs": "jsr:@std/fs@^1.0.0",
"@std/yaml": "jsr:@std/yaml@^1.0.0", "@std/yaml": "jsr:@std/yaml@^1.0.0",
"@std/assert": "jsr:@std/assert@^1.0.0", "@std/assert": "jsr:@std/assert@^1.0.0",
"@std/fmt": "jsr:@std/fmt@^1.0.0", "@std/cli": "jsr:@std/cli@^1.0.0"
"@push.rocks/smartcli": "npm:@push.rocks/smartcli@^5.0.0",
"@push.rocks/smartlog": "npm:@push.rocks/smartlog@^3.0.0",
"@push.rocks/smartfile": "npm:@push.rocks/smartfile@^11.0.0",
"@push.rocks/smartpromise": "npm:@push.rocks/smartpromise@^4.0.0",
"@push.rocks/smartrequest": "npm:@push.rocks/smartrequest@^2.0.0"
}, },
"nodeModulesDir": "auto",
"compilerOptions": { "compilerOptions": {
"lib": [ "lib": [
"deno.window" "deno.window"
], ],
"strict": true, "strict": true
"allowJs": false
}, },
"fmt": { "fmt": {
"useTabs": false, "useTabs": false,

70
deno.lock generated Normal file
View File

@@ -0,0 +1,70 @@
{
"version": "5",
"specifiers": {
"jsr:@std/assert@1": "1.0.15",
"jsr:@std/cli@1": "1.0.23",
"jsr:@std/fs@1": "1.0.19",
"jsr:@std/internal@^1.0.10": "1.0.12",
"jsr:@std/internal@^1.0.12": "1.0.12",
"jsr:@std/internal@^1.0.9": "1.0.12",
"jsr:@std/path@1": "1.1.2",
"jsr:@std/path@^1.1.1": "1.1.2",
"jsr:@std/yaml@1": "1.0.10",
"npm:@types/node@*": "24.2.0"
},
"jsr": {
"@std/assert@1.0.15": {
"integrity": "d64018e951dbdfab9777335ecdb000c0b4e3df036984083be219ce5941e4703b",
"dependencies": [
"jsr:@std/internal@^1.0.12"
]
},
"@std/cli@1.0.23": {
"integrity": "bf95b7a9425ba2af1ae5a6359daf58c508f2decf711a76ed2993cd352498ccca",
"dependencies": [
"jsr:@std/internal@^1.0.12"
]
},
"@std/fs@1.0.19": {
"integrity": "051968c2b1eae4d2ea9f79a08a3845740ef6af10356aff43d3e2ef11ed09fb06",
"dependencies": [
"jsr:@std/internal@^1.0.9",
"jsr:@std/path@^1.1.1"
]
},
"@std/internal@1.0.12": {
"integrity": "972a634fd5bc34b242024402972cd5143eac68d8dffaca5eaa4dba30ce17b027"
},
"@std/path@1.1.2": {
"integrity": "c0b13b97dfe06546d5e16bf3966b1cadf92e1cc83e56ba5476ad8b498d9e3038",
"dependencies": [
"jsr:@std/internal@^1.0.10"
]
},
"@std/yaml@1.0.10": {
"integrity": "245706ea3511cc50c8c6d00339c23ea2ffa27bd2c7ea5445338f8feff31fa58e"
}
},
"npm": {
"@types/node@24.2.0": {
"integrity": "sha512-3xyG3pMCq3oYCNg7/ZP+E1ooTaGB4cG8JWRsqqOYQdbWNY4zbaV0Ennrd7stjiJEFZCaybcIgpTjJWHRfBSIDw==",
"dependencies": [
"undici-types"
],
"tarball": "https://verdaccio.lossless.digital/@types/node/-/node-24.2.0.tgz"
},
"undici-types@7.10.0": {
"integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==",
"tarball": "https://verdaccio.lossless.digital/undici-types/-/undici-types-7.10.0.tgz"
}
},
"workspace": {
"dependencies": [
"jsr:@std/assert@1",
"jsr:@std/cli@1",
"jsr:@std/fs@1",
"jsr:@std/path@1",
"jsr:@std/yaml@1"
]
}
}

View File

@@ -1,6 +1,6 @@
{ {
"name": "@serve.zone/isocreator", "name": "@serve.zone/isocreator",
"version": "1.1.0", "version": "1.2.3",
"description": "Ubuntu ISO customization tool for PC and Raspberry Pi with WiFi and cloud-init configuration", "description": "Ubuntu ISO customization tool for PC and Raspberry Pi with WiFi and cloud-init configuration",
"type": "module", "type": "module",
"bin": { "bin": {

View File

@@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@serve.zone/isocreator', name: '@serve.zone/isocreator',
version: '1.1.0', version: '1.2.3',
description: 'Ubuntu ISO customization tool for PC and Raspberry Pi with WiFi and cloud-init configuration' description: 'Ubuntu ISO customization tool for PC and Raspberry Pi with WiFi and cloud-init configuration'
} }

View File

@@ -1,29 +1,34 @@
/** /**
* Logging utilities for isocreator * Logging utilities for isocreator
* Simple console-based logging (following nupst pattern)
*/ */
import { smartlog } from './plugins.ts';
// Create logger instance
export const logger = new smartlog.Smartlog({
logContext: {
company: 'Lossless GmbH',
companyunit: 'serve.zone',
containerName: 'isocreator',
environment: 'cli',
runtime: 'deno',
zone: 'local',
},
minimumLogLevel: 'info',
});
/** /**
* Log levels for convenience * Log levels for convenience
*/ */
export const log = { export const log = {
info: (message: string) => logger.log('info', message), info: (message: string) => console.log(` ${message}`),
success: (message: string) => logger.log('info', `${message}`), success: (message: string) => console.log(`${message}`),
warn: (message: string) => logger.log('warn', `⚠️ ${message}`), warn: (message: string) => console.warn(`⚠️ ${message}`),
error: (message: string) => logger.log('error', `${message}`), error: (message: string) => console.error(`${message}`),
debug: (message: string) => logger.log('silly', message), debug: (message: string) => console.log(`🔍 ${message}`),
};
// Export a simple logger object for compatibility
export const logger = {
log: (level: string, message: string) => {
switch (level) {
case 'info':
log.info(message);
break;
case 'warn':
log.warn(message);
break;
case 'error':
log.error(message);
break;
default:
console.log(message);
}
},
}; };

View File

@@ -8,11 +8,4 @@ export * as path from '@std/path';
export * as fs from '@std/fs'; export * as fs from '@std/fs';
export * as yaml from '@std/yaml'; export * as yaml from '@std/yaml';
export * as assert from '@std/assert'; export * as assert from '@std/assert';
export * as fmt from '@std/fmt'; export * as cli from '@std/cli';
// Push.rocks ecosystem
export { smartcli } from '@push.rocks/smartcli';
export { smartlog } from '@push.rocks/smartlog';
export { smartfile } from '@push.rocks/smartfile';
export { Deferred } from '@push.rocks/smartpromise';
export { smartrequest } from '@push.rocks/smartrequest';