fix: remove githubusercontent proxy #4
Workflow file for this run
This file contains 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: Build and Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
include: | |
- os: ubuntu-latest | |
output_path: build/linux/x64/release/bundle | |
asset_name: chatmcp-linux-x64.tar.gz | |
build_target: linux | |
- os: macos-latest | |
output_path: build/macos/Build/Products/Release/chatmcp.app | |
asset_name: chatmcp-macos-x64.dmg | |
build_target: macos | |
- os: windows-latest | |
output_path: build/windows/x64/Runner/Release | |
asset_name: chatmcp-windows-x64.zip | |
build_target: windows | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: '3.27.0' | |
- name: Create empty .env file | |
run: touch .env | |
- name: Install Linux Dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ninja-build libgtk-3-dev | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Build ${{ matrix.build_target }} | |
run: flutter build ${{ matrix.build_target }} --release | |
- name: Package Linux App | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
cd build/linux/x64/release/bundle | |
tar -czf "${GITHUB_WORKSPACE}/${{ matrix.asset_name }}" * | |
- name: Package macOS App | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install create-dmg | |
create-dmg \ | |
--volname "ChatMcp" \ | |
--window-pos 200 120 \ | |
--window-size 800 400 \ | |
--icon-size 100 \ | |
--icon "chatmcp.app" 200 190 \ | |
--hide-extension "chatmcp.app" \ | |
--app-drop-link 600 185 \ | |
"${{ matrix.asset_name }}" \ | |
"${{ matrix.output_path }}" | |
- name: Package Windows App | |
if: matrix.os == 'windows-latest' | |
run: | | |
Copy-Item -Path "windows/sqlite3.dll" -Destination "${{ matrix.output_path }}" -Force | |
Compress-Archive -Path "${{ matrix.output_path }}/*" -DestinationPath "${{ matrix.asset_name }}" -Force | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: chatmcp-${{ matrix.build_target }} | |
path: ${{ matrix.asset_name }} | |
- name: Create Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ${{ matrix.asset_name }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} |