Skip to content

Fix incorrect way to terminate app (#21) #27

Fix incorrect way to terminate app (#21)

Fix incorrect way to terminate app (#21) #27

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
id-token: write
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: linux-x64
artifact: simutil-linux-x64
- os: macos-15-intel
target: macos-x64
artifact: simutil-macos-x64
- os: macos-14
target: macos-arm64
artifact: simutil-macos-arm64
- os: windows-latest
target: windows-x64
artifact: simutil-windows-x64.exe
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: stable
- name: Install dependencies
run: dart pub get
- name: Run build_runner
run: dart run build_runner build --delete-conflicting-outputs
- name: Build executable
run: dart compile exe bin/simutil.dart -o ${{ matrix.artifact }}
- name: Create archive (Unix)
if: runner.os != 'Windows'
run: |
chmod +x ${{ matrix.artifact }}
tar -czvf simutil-${{ matrix.target }}.tar.gz ${{ matrix.artifact }}
- name: Create archive (Windows)
if: runner.os == 'Windows'
run: |
Compress-Archive -Path ${{ matrix.artifact }} -DestinationPath simutil-${{ matrix.target }}.zip
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: simutil-${{ matrix.target }}
path: simutil-${{ matrix.target }}.${{ runner.os == 'Windows' && 'zip' || 'tar.gz' }}
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Generate checksums
run: |
cd artifacts
find . -type f \( -name "*.tar.gz" -o -name "*.zip" \) -exec mv {} . \;
sha256sum *.tar.gz *.zip > checksums.txt
cat checksums.txt
- name: Create Draft GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
token: ${{ secrets.GH_PAT }}
files: |
artifacts/*.tar.gz
artifacts/*.zip
artifacts/checksums.txt
# deploy-homebrew:
# name: Deploy to Homebrew
# needs: release
# uses: ./.github/workflows/deploy-homebrew.yaml
# secrets: inherit
# deploy-winget:
# name: Deploy to WinGet
# needs: release
# uses: ./.github/workflows/deploy-winget.yaml
# secrets: inherit