|
| 1 | +name: Release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'v*' |
| 7 | + workflow_dispatch: |
| 8 | + inputs: |
| 9 | + version: |
| 10 | + description: 'Version to release (e.g., v1.0.0)' |
| 11 | + required: true |
| 12 | + type: string |
| 13 | + |
| 14 | +permissions: |
| 15 | + contents: write |
| 16 | + |
| 17 | +jobs: |
| 18 | + # Build jobs for each platform |
| 19 | + build-linux: |
| 20 | + uses: ./.github/workflows/build-linux.yml |
| 21 | + secrets: inherit |
| 22 | + |
| 23 | + build-macos: |
| 24 | + uses: ./.github/workflows/build-macos.yml |
| 25 | + secrets: inherit |
| 26 | + |
| 27 | + build-windows: |
| 28 | + uses: ./.github/workflows/build-windows.yml |
| 29 | + secrets: inherit |
| 30 | + |
| 31 | + # Create release after all builds complete |
| 32 | + create-release: |
| 33 | + name: Create Release |
| 34 | + needs: [build-linux, build-macos, build-windows] |
| 35 | + runs-on: ubuntu-latest |
| 36 | + |
| 37 | + steps: |
| 38 | + - uses: actions/checkout@v4 |
| 39 | + |
| 40 | + - name: Determine version |
| 41 | + id: version |
| 42 | + run: | |
| 43 | + if [ "${{ github.event_name }}" = "push" ]; then |
| 44 | + VERSION="${GITHUB_REF#refs/tags/}" |
| 45 | + else |
| 46 | + VERSION="${{ inputs.version }}" |
| 47 | + fi |
| 48 | + echo "version=$VERSION" >> $GITHUB_OUTPUT |
| 49 | + echo "Version: $VERSION" |
| 50 | + |
| 51 | + - name: Download all artifacts |
| 52 | + uses: actions/download-artifact@v4 |
| 53 | + with: |
| 54 | + path: artifacts |
| 55 | + |
| 56 | + - name: Prepare release assets |
| 57 | + run: | |
| 58 | + mkdir -p release-assets |
| 59 | + |
| 60 | + # Linux artifacts |
| 61 | + if [ -d "artifacts/linux-x86_64" ]; then |
| 62 | + cp artifacts/linux-x86_64/*.deb release-assets/Claudia_${{ steps.version.outputs.version }}_linux_x86_64.deb || true |
| 63 | + cp artifacts/linux-x86_64/*.AppImage release-assets/Claudia_${{ steps.version.outputs.version }}_linux_x86_64.AppImage || true |
| 64 | + fi |
| 65 | + |
| 66 | + # macOS artifacts |
| 67 | + if [ -d "artifacts/macos-universal" ]; then |
| 68 | + cp artifacts/macos-universal/Claudia.dmg release-assets/Claudia_${{ steps.version.outputs.version }}_macos_universal.dmg || true |
| 69 | + cp artifacts/macos-universal/Claudia.app.zip release-assets/Claudia_${{ steps.version.outputs.version }}_macos_universal.app.tar.gz || true |
| 70 | + fi |
| 71 | + |
| 72 | + # Windows artifacts |
| 73 | + if [ -d "artifacts/windows-x86_64" ]; then |
| 74 | + cp artifacts/windows-x86_64/*.msi release-assets/Claudia_${{ steps.version.outputs.version }}_windows_x86_64.msi || true |
| 75 | + cp artifacts/windows-x86_64/*.exe release-assets/Claudia_${{ steps.version.outputs.version }}_windows_x86_64_setup.exe || true |
| 76 | + cp artifacts/windows-x86_64/Claudia-windows-x86_64.zip release-assets/Claudia_${{ steps.version.outputs.version }}_windows_x86_64.zip || true |
| 77 | + fi |
| 78 | + |
| 79 | + # Generate signatures for all files |
| 80 | + cd release-assets |
| 81 | + for file in *; do |
| 82 | + if [ -f "$file" ]; then |
| 83 | + sha256sum "$file" > "$file.sha256" |
| 84 | + fi |
| 85 | + done |
| 86 | + cd .. |
| 87 | + |
| 88 | + - name: Create Release |
| 89 | + uses: softprops/action-gh-release@v1 |
| 90 | + with: |
| 91 | + tag_name: ${{ steps.version.outputs.version }} |
| 92 | + name: Claudia ${{ steps.version.outputs.version }} |
| 93 | + draft: true |
| 94 | + prerelease: false |
| 95 | + generate_release_notes: true |
| 96 | + files: release-assets/* |
| 97 | + body: | |
| 98 | + ## Claudia ${{ steps.version.outputs.version }} |
| 99 | + |
| 100 | + ### Downloads |
| 101 | + |
| 102 | + #### macOS |
| 103 | + - Universal binary (Intel + Apple Silicon) |
| 104 | + - `.dmg` - Disk image installer (recommended) |
| 105 | + - `.app.tar.gz` - Application bundle |
| 106 | + |
| 107 | + #### Windows |
| 108 | + - `.msi` - Windows Installer (recommended) |
| 109 | + - `.exe` - NSIS installer (alternative) |
| 110 | + - `.zip` - Portable executable |
| 111 | + |
| 112 | + #### Linux |
| 113 | + - `.AppImage` - Universal Linux package (recommended) |
| 114 | + - `.deb` - Debian/Ubuntu package |
| 115 | + |
| 116 | + ### Installation |
| 117 | + |
| 118 | + **macOS**: Download the `.dmg` file, open it, and drag Claudia to your Applications folder. |
| 119 | + |
| 120 | + **Windows**: Download the `.msi` file and run it. For portable use, download the `.zip` file. |
| 121 | + |
| 122 | + **Linux**: Download the `.AppImage` file, make it executable (`chmod +x`), and run it. For Debian/Ubuntu, use the `.deb` file. |
| 123 | + |
| 124 | + ### Verification |
| 125 | + |
| 126 | + All files include `.sha256` signature files for verification. |
| 127 | + |
| 128 | + ### What's Changed |
| 129 | + |
| 130 | + See below for a full list of changes in this release. |
0 commit comments