docs(agents): clarify comment in fetch_github_agents for .opcode.json… #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version to release (e.g., v1.0.0)' | |
required: true | |
type: string | |
permissions: | |
contents: write | |
jobs: | |
# Build jobs for each platform | |
build-linux: | |
uses: ./.github/workflows/build-linux.yml | |
secrets: inherit | |
build-macos: | |
uses: ./.github/workflows/build-macos.yml | |
secrets: inherit | |
# Create release after all builds complete | |
create-release: | |
name: Create Release | |
needs: [build-linux, build-macos] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Determine version | |
id: version | |
run: | | |
if [ "${{ github.event_name }}" = "push" ]; then | |
VERSION="${GITHUB_REF#refs/tags/}" | |
else | |
VERSION="${{ inputs.version }}" | |
fi | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
echo "Version: $VERSION" | |
- name: Download all artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: Prepare release assets | |
run: | | |
mkdir -p release-assets | |
# Linux artifacts | |
if [ -d "artifacts/linux-x86_64" ]; then | |
cp artifacts/linux-x86_64/*.deb release-assets/opcode_${{ steps.version.outputs.version }}_linux_x86_64.deb || true | |
cp artifacts/linux-x86_64/*.AppImage release-assets/opcode_${{ steps.version.outputs.version }}_linux_x86_64.AppImage || true | |
fi | |
# macOS artifacts | |
if [ -d "artifacts/macos-universal" ]; then | |
cp artifacts/macos-universal/opcode.dmg release-assets/opcode_${{ steps.version.outputs.version }}_macos_universal.dmg || true | |
cp artifacts/macos-universal/opcode.app.zip release-assets/opcode_${{ steps.version.outputs.version }}_macos_universal.app.tar.gz || true | |
fi | |
# Create source code archives | |
# Clean version without 'v' prefix for archive names | |
CLEAN_VERSION="${{ steps.version.outputs.version }}" | |
CLEAN_VERSION="${CLEAN_VERSION#v}" | |
# Create source code archives (excluding .git and other unnecessary files) | |
echo "Creating source code archives..." | |
# Create a clean export of the repository | |
git archive --format=tar.gz --prefix=opcode-${CLEAN_VERSION}/ -o release-assets/opcode-${CLEAN_VERSION}.tar.gz HEAD | |
git archive --format=zip --prefix=opcode-${CLEAN_VERSION}/ -o release-assets/opcode-${CLEAN_VERSION}.zip HEAD | |
# Generate signatures for all files | |
cd release-assets | |
for file in *; do | |
if [ -f "$file" ]; then | |
sha256sum "$file" > "$file.sha256" | |
fi | |
done | |
cd .. | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.version.outputs.version }} | |
name: opcode ${{ steps.version.outputs.version }} | |
draft: true | |
prerelease: false | |
generate_release_notes: true | |
files: release-assets/* | |
body: | | |
<div align="center"> | |
<img src="https://raw.githubusercontent.com/${{ github.repository }}/${{ steps.version.outputs.version }}/src-tauri/icons/icon.png" alt="opcode Logo" width="128" height="128"> | |
</div> | |
## opcode ${{ steps.version.outputs.version }} | |
This release was built and signed by CI. Artifacts for macOS and Linux are attached below. | |
- Auto-generated release notes are included below (commits, PRs, and contributors). | |
- Checksums (`.sha256`) are provided for all assets. | |
### Downloads | |
- macOS: `.dmg`, `.app.tar.gz` (Universal: Apple Silicon + Intel) | |
- Linux: `.AppImage`, `.deb` | |
### Installation | |
- macOS: Open the `.dmg` and drag opcode to Applications. | |
- Linux: `chmod +x` the `.AppImage` and run it, or install the `.deb` on Debian/Ubuntu. | |