2.7 KiB
SZCI Gitea CI/CD Workflows
This directory contains Gitea Actions workflows for automated CI/CD of the SZCI project.
Workflows
1. CI (ci.yml)
Trigger: Push to master branch or pull requests
Purpose: Continuous integration checks on every push
Jobs:
- Type Check & Lint - Validates TypeScript types and code style
- Build Test - Compiles binary for Linux x64 and tests execution
- Build All Platforms - Compiles all 5 platform binaries and uploads as artifacts
Usage: Automatically runs on every commit to ensure code quality
2. Release (release.yml)
Trigger: Push of version tags (e.g., v5.0.0)
Purpose: Creates GitHub releases with pre-compiled binaries
Jobs:
- Validates deno.json version matches git tag
- Compiles binaries for all 5 platforms
- Generates SHA256 checksums
- Creates Gitea release with binaries as assets
- Cleans up old releases (keeps last 3)
Usage:
# Update version in deno.json to 6.0.1
# Then create and push tag:
git tag v6.0.1
git push origin v6.0.1
Output: Release at https://code.foss.global/ship.zone/szci/releases/tag/v6.0.1
3. NPM Publish (npm-publish.yml)
Trigger: Push of version tags (e.g., v5.0.0)
Purpose: Publishes package to npm registry
Jobs:
- Validates deno.json version matches git tag
- Compiles all binaries
- Syncs package.json version
- Creates npm package
- Publishes to npm with access token
- Verifies publication
Prerequisites:
NPM_TOKENmust be set in Gitea secrets
Usage: Same as release workflow (automatically triggered by version tags)
Output: Package at https://www.npmjs.com/package/@ship.zone/szci
Release Process
To create a new release:
-
Update version in deno.json:
{ "version": "6.0.1" } -
Commit the version change:
git add deno.json git commit -m "6.0.1" -
Create and push tag:
git tag v6.0.1 git push origin master git push origin v6.0.1 -
Workflows run automatically:
release.ymlcreates Gitea release with binariesnpm-publish.ymlpublishes to npm
-
Verify:
Secrets Required
Configure these in Gitea repository settings:
GITHUB_TOKEN- Gitea access token (auto-provided)NPM_TOKEN- npm publish token (must be configured)
Binary Artifacts
Each workflow produces binaries for:
- Linux x86_64
- Linux ARM64
- macOS x86_64
- macOS ARM64
- Windows x86_64
Total size per release: ~4GB (5 binaries × ~800MB each)