Skip to content

add MacOS workflow

add MacOS workflow #4

name: Windows testing Workflow
on:
push:
branches:
- main
- redesign
workflow_dispatch:
concurrency:
group: release_workflow
cancel-in-progress: true
jobs:
build_windows:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup environment variables
run: cat .github/workflows/versions.env >> $GITHUB_ENV
- name: Prepare Windows environment
run: ./scripts/prepare-windows.ps1
shell: pwsh
- name: Build OLM library for Windows
run: ./scripts/build-olm-windows.sh
shell: bash
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Get Flutter dependencies
run: flutter pub get
- name: Build Windows Release
run: flutter build windows --release
- name: Get tag
id: tag
run: |
echo "TAG=$(git describe --tags)" >> $GITHUB_ENV
shell: bash
- name: Post-build Windows operations
run: ./scripts/build-windows.ps1
shell: pwsh
- name: List directory contents
run: |
dir
dir build\windows\runner\Release
shell: cmd
- name: Create Archive for Release
run: |
cd $env:GITHUB_WORKSPACE
tar -czf "tawkie-windows.tar.gz" -C "build\windows\runner\Release" .
shell: pwsh
- name: Upload Windows Release to GitHub
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "tawkie-windows.tar.gz"
asset_name: "tawkie-windows-${{ env.TAG }}.tar.gz"
asset_content_type: application/gzip