feat(acp): Session persistence, connection health and UI polish (#45) #29
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*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| create-release: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.meta.outputs.version }} | |
| tag_name: ${{ steps.meta.outputs.tag_name }} | |
| release_id: ${{ steps.release.outputs.id }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Extract version metadata | |
| id: meta | |
| run: | | |
| TAG="${GITHUB_REF_NAME}" | |
| VERSION="${TAG#v}" | |
| echo "tag_name=$TAG" >> "$GITHUB_OUTPUT" | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Generate changelog | |
| id: changelog | |
| run: | | |
| TAG="${GITHUB_REF_NAME}" | |
| PREV_TAG=$(git tag --sort=-v:refname | grep '^v' | sed -n '2p' || echo "") | |
| if [ -z "$PREV_TAG" ]; then | |
| RANGE="$TAG" | |
| else | |
| RANGE="$PREV_TAG..$TAG" | |
| fi | |
| FEATURES=$(git log "$RANGE" --pretty=format:"- %s" --grep="^feat" || true) | |
| FIXES=$(git log "$RANGE" --pretty=format:"- %s" --grep="^fix" || true) | |
| OTHER=$(git log "$RANGE" --pretty=format:"- %s" --grep="^refactor\|^perf\|^build\|^ci\|^chore" || true) | |
| { | |
| echo "body<<CHANGELOG_EOF" | |
| if [ -n "$FEATURES" ]; then | |
| echo "### Features" | |
| echo "$FEATURES" | |
| echo "" | |
| fi | |
| if [ -n "$FIXES" ]; then | |
| echo "### Fixes" | |
| echo "$FIXES" | |
| echo "" | |
| fi | |
| if [ -n "$OTHER" ]; then | |
| echo "### Other" | |
| echo "$OTHER" | |
| echo "" | |
| fi | |
| echo "---" | |
| echo "**Full Changelog**: https://github.com/${{ github.repository }}/compare/${PREV_TAG:-$(git rev-list --max-parents=0 HEAD | head -1)}...$TAG" | |
| echo "CHANGELOG_EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Create draft release | |
| id: release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.meta.outputs.tag_name }} | |
| name: "Arandu ${{ steps.meta.outputs.tag_name }}" | |
| body: ${{ steps.changelog.outputs.body }} | |
| draft: true | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| build-tauri: | |
| needs: create-release | |
| uses: ./.github/workflows/release-tauri.yml | |
| with: | |
| version: ${{ needs.create-release.outputs.version }} | |
| tag_name: ${{ needs.create-release.outputs.tag_name }} | |
| release_id: ${{ needs.create-release.outputs.release_id }} | |
| secrets: | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
| APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | |
| APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} | |
| APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }} | |
| APPLE_API_KEY_CONTENT: ${{ secrets.APPLE_API_KEY_CONTENT }} | |
| publish-release: | |
| needs: [create-release, build-tauri] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Publish release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh release edit "${{ needs.create-release.outputs.tag_name }}" --repo "${{ github.repository }}" --draft=false | |
| update-homebrew: | |
| needs: [create-release, publish-release] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download macOS DMGs and compute SHA256 | |
| id: sha | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| VERSION: ${{ needs.create-release.outputs.version }} | |
| run: | | |
| BASE="https://github.com/${{ github.repository }}/releases/download/v${VERSION}" | |
| curl -sL "${BASE}/Arandu_${VERSION}_aarch64.dmg" -o arm.dmg | |
| curl -sL "${BASE}/Arandu_${VERSION}_x64.dmg" -o intel.dmg | |
| echo "arm=$(sha256sum arm.dmg | cut -d' ' -f1)" >> "$GITHUB_OUTPUT" | |
| echo "intel=$(sha256sum intel.dmg | cut -d' ' -f1)" >> "$GITHUB_OUTPUT" | |
| - name: Update Cask in homebrew tap | |
| env: | |
| GH_TOKEN: ${{ secrets.PAT }} | |
| VERSION: ${{ needs.create-release.outputs.version }} | |
| SHA_ARM: ${{ steps.sha.outputs.arm }} | |
| SHA_INTEL: ${{ steps.sha.outputs.intel }} | |
| run: | | |
| CASK=$(cat <<RUBY | |
| cask "arandu" do | |
| version "${VERSION}" | |
| on_arm do | |
| sha256 "${SHA_ARM}" | |
| url "https://github.com/devitools/arandu/releases/download/v#{version}/Arandu_#{version}_aarch64.dmg" | |
| end | |
| on_intel do | |
| sha256 "${SHA_INTEL}" | |
| url "https://github.com/devitools/arandu/releases/download/v#{version}/Arandu_#{version}_x64.dmg" | |
| end | |
| name "Arandu" | |
| desc "Minimal Markdown viewer with GFM support, syntax highlighting, and live reload" | |
| homepage "https://github.com/devitools/arandu" | |
| depends_on macos: ">= :ventura" | |
| app "Arandu.app" | |
| postflight do | |
| system_command "/usr/bin/xattr", | |
| args: ["-cr", "#{appdir}/Arandu.app"], | |
| sudo: false | |
| end | |
| zap trash: [ | |
| "~/Library/Application Support/com.devitools.arandu", | |
| "~/Library/Caches/com.devitools.arandu", | |
| "~/Library/Preferences/com.devitools.arandu.plist", | |
| ] | |
| end | |
| RUBY | |
| ) | |
| FILE_SHA=$(gh api repos/devitools/homebrew-arandu/contents/Casks/arandu.rb --jq '.sha') | |
| CONTENT=$(echo "$CASK" | base64 -w 0) | |
| gh api repos/devitools/homebrew-arandu/contents/Casks/arandu.rb \ | |
| -X PUT \ | |
| -f message="chore: update Cask to v${VERSION}" \ | |
| -f content="$CONTENT" \ | |
| -f sha="$FILE_SHA" |