Skip to content

feat(chat): add images #3

feat(chat): add images

feat(chat): add images #3

Workflow file for this run

name: build & release chat
on:
push:
branches: [smallbrain/scroll]
workflow_dispatch:
inputs:
release:
description: "create a new release"
required: true
default: false
type: boolean
version:
description: "release version number"
required: false
type: string
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: setup rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: install deps
run: |
brew install create-dmg
cargo install cargo-bundle
- name: bundle app
run: |
cd chat
cargo bundle --release
- name: create dmg
run: |
create-dmg \
--volname "chat" \
--window-pos 200 120 \
--window-size 800 400 \
--icon-size 100 \
--icon "chat.app" 200 190 \
--hide-extension "chat.app" \
--app-drop-link 600 185 \
"chat.dmg" \
"chat/target/release/bundle/osx/chat.app" # Adjust this path if necessary
- name: upload dmg
uses: actions/upload-artifact@v4
with:
name: chat-dmg
path: chat.dmg
release:
needs: build
if: github.event.inputs.release == 'true'
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: download dmg
uses: actions/download-artifact@v4
with:
name: chat-dmg
- name: generate release notes
run: |
echo "Release notes for version ${{ github.event.inputs.version }}" > RELEASE_NOTES.md
echo "Changelog:" >> RELEASE_NOTES.md
git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"%s" >> RELEASE_NOTES.md
- name: create gh release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.event.inputs.version }}
name: Release ${{ github.event.inputs.version }}
body_path: RELEASE_NOTES.md
draft: false
prerelease: false
files: chat.dmg