ci: migrate release build to GitHub Actions
- add .github/workflows/build.yml: native per-OS runners (ubuntu/macos/windows) build and attach archives to the GitHub Release via gh CLI with GITHUB_TOKEN - add workflow_dispatch to smoke-test builds without publishing a release - remove .gitea/workflows/build.yml (cargo-zigbuild + Gitea API upload no longer used) - docs: point clone and release URLs at github.com and update the Building section
This commit is contained in:
3 files changed
+67
-79
No files matched your search
@@ -1,76 +0,0 @@
|
|||||||
name: Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- target: x86_64-unknown-linux-gnu
|
|
||||||
binary: ccsm
|
|
||||||
archive: ccsm-linux-amd64.tar.gz
|
|
||||||
- target: x86_64-apple-darwin
|
|
||||||
binary: ccsm
|
|
||||||
archive: ccsm-darwin-amd64.tar.gz
|
|
||||||
- target: x86_64-pc-windows-gnu
|
|
||||||
binary: ccsm.exe
|
|
||||||
archive: ccsm-windows-amd64.zip
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set version
|
|
||||||
run: |
|
|
||||||
VERSION="${{ github.event.release.tag_name }}"
|
|
||||||
VERSION="${VERSION#v}"
|
|
||||||
echo "CCSM_VERSION=$VERSION" >> "$GITHUB_ENV"
|
|
||||||
|
|
||||||
- name: Install Rust
|
|
||||||
run: |
|
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
|
||||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
||||||
|
|
||||||
- name: Install Rust targets
|
|
||||||
run: |
|
|
||||||
rustup target add ${{ matrix.target }}
|
|
||||||
|
|
||||||
- name: Build (Linux)
|
|
||||||
if: matrix.target == 'x86_64-unknown-linux-gnu'
|
|
||||||
run: cargo build --release --target ${{ matrix.target }}
|
|
||||||
|
|
||||||
- name: Install Zig
|
|
||||||
if: matrix.target != 'x86_64-unknown-linux-gnu'
|
|
||||||
run: |
|
|
||||||
curl -L -o zig.tar.xz https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz
|
|
||||||
tar xf zig.tar.xz
|
|
||||||
echo "$PWD/zig-linux-x86_64-0.13.0" >> "$GITHUB_PATH"
|
|
||||||
|
|
||||||
- name: Install cargo-zigbuild
|
|
||||||
if: matrix.target != 'x86_64-unknown-linux-gnu'
|
|
||||||
run: cargo install cargo-zigbuild
|
|
||||||
|
|
||||||
- name: Build with zigbuild
|
|
||||||
if: matrix.target != 'x86_64-unknown-linux-gnu'
|
|
||||||
run: cargo zigbuild --release --target ${{ matrix.target }}
|
|
||||||
|
|
||||||
- name: Package
|
|
||||||
run: |
|
|
||||||
cd "target/${{ matrix.target }}/release"
|
|
||||||
if [[ "${{ matrix.target }}" == *-windows-* ]]; then
|
|
||||||
zip "${{ matrix.archive }}" "${{ matrix.binary }}"
|
|
||||||
else
|
|
||||||
tar czf "${{ matrix.archive }}" "${{ matrix.binary }}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Upload to release
|
|
||||||
run: |
|
|
||||||
curl --fail -X POST \
|
|
||||||
-H "Authorization: Bearer ${{ secrets.GITEA_TOKEN }}" \
|
|
||||||
-H "Content-Type: application/octet-stream" \
|
|
||||||
--data-binary @"target/${{ matrix.target }}/release/${{ matrix.archive }}" \
|
|
||||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${{ github.event.release.id }}/assets?name=${{ matrix.archive }}"
|
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
workflow_dispatch: # manual: build + package only (no version override, no upload)
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write # so GITHUB_TOKEN can upload assets to the release
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: ${{ matrix.archive }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
target: x86_64-unknown-linux-gnu
|
||||||
|
binary: ccsm
|
||||||
|
archive: ccsm-linux-amd64.tar.gz
|
||||||
|
- os: macos-latest
|
||||||
|
target: x86_64-apple-darwin
|
||||||
|
binary: ccsm
|
||||||
|
archive: ccsm-darwin-amd64.tar.gz
|
||||||
|
- os: windows-latest
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
|
binary: ccsm.exe
|
||||||
|
archive: ccsm-windows-amd64.zip
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
|
||||||
|
- name: Set version from release tag
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
run: |
|
||||||
|
VERSION="${GITHUB_REF_NAME#v}"
|
||||||
|
echo "CCSM_VERSION=$VERSION" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Install Rust toolchain (+ target)
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
targets: ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Build release binary
|
||||||
|
run: cargo build --release --target ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Package archive
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd "target/${{ matrix.target }}/release"
|
||||||
|
if [[ "${{ runner.os }}" == 'Windows' ]]; then
|
||||||
|
powershell -NoProfile -Command "Compress-Archive -Path '${{ matrix.binary }}' -DestinationPath '${{ matrix.archive }}' -Force"
|
||||||
|
else
|
||||||
|
tar czf "${{ matrix.archive }}" "${{ matrix.binary }}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Upload to GitHub release
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
run: gh release upload "${{ github.event.release.tag_name }}" "target/${{ matrix.target }}/release/${{ matrix.archive }}" --clobber
|
||||||
@@ -7,14 +7,14 @@ A CLI tool for discovering, installing, and managing [Claude Code](https://claud
|
|||||||
### From source
|
### From source
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://onixbyte.dev/onixbyte/claude-code-skill-manager.git
|
git clone https://github.com/onixbyte/claude-code-skill-manager.git
|
||||||
cd claude-code-skill-manager
|
cd claude-code-skill-manager
|
||||||
cargo install --path .
|
cargo install --path .
|
||||||
```
|
```
|
||||||
|
|
||||||
### Pre-built binaries
|
### Pre-built binaries
|
||||||
|
|
||||||
Download the latest binary for your platform from the [Releases](https://onixbyte.dev/onixbyte/claude-code-skill-manager/releases) page.
|
Download the latest binary for your platform from the [Releases](https://github.com/onixbyte/claude-code-skill-manager/releases) page.
|
||||||
|
|
||||||
## Quick start
|
## Quick start
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ CCSM fetches `skills.json` from the raw `main` or `master` branch automatically,
|
|||||||
cargo build --release
|
cargo build --release
|
||||||
```
|
```
|
||||||
|
|
||||||
Cross-compilation targets: Linux (amd64), macOS (amd64), and Windows (amd64) via `cargo-zigbuild`.
|
Release binaries for Linux, macOS, and Windows (amd64) are built natively per platform by GitHub Actions and attached to each GitHub Release.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user