chore(deps): bump kterm from 1.0.9 to 1.1.0 #110
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: CI | |
| on: | |
| push: | |
| branches: [main, master] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [macos-latest, ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.41.4' | |
| - name: Install Linux dependencies | |
| if: matrix.platform == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgtk-3-dev liblzma-dev libstdc++-12-dev | |
| - run: flutter pub get | |
| - run: flutter test | |
| - name: Build Linux | |
| if: matrix.platform == 'ubuntu-latest' | |
| run: | | |
| flutter build linux --release | |
| cd build/linux/x64/release | |
| zip -r lbpSSH-linux-x64.zip bundle | |
| - name: Build macOS | |
| if: matrix.platform == 'macos-latest' | |
| run: | | |
| flutter build macos --release --no-tree-shake-icons | |
| cd build/macos/Build/Products/Release | |
| zip -r lbpSSH-macos-universal.zip lbpSSH.app | |
| - name: Build Windows | |
| if: matrix.platform == 'windows-latest' | |
| run: | | |
| flutter build windows --release | |
| Compress-Archive -Path build/windows/x64/runner -DestinationPath build/windows/x64/lbpSSH-windows-x64.zip | |
| - name: Upload Linux build | |
| if: matrix.platform == 'ubuntu-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-build | |
| path: build/linux/x64/release/lbpSSH-linux-x64.zip | |
| - name: Upload macOS build | |
| if: matrix.platform == 'macos-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-build | |
| path: build/macos/Build/Products/Release/lbpSSH-macos-universal.zip | |
| - name: Upload Windows build | |
| if: matrix.platform == 'windows-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-build | |
| path: build/windows/x64/lbpSSH-windows-x64.zip | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/') | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download Linux build | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-build | |
| path: releases/ | |
| - name: Download Windows build | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-build | |
| path: releases/ | |
| - name: Download macOS build | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: macos-build | |
| path: releases/ | |
| - name: Get version | |
| id: version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.version.outputs.VERSION }} | |
| name: Release ${{ steps.version.outputs.VERSION }} | |
| draft: false | |
| prerelease: false | |
| files: | | |
| releases/**/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Update Homebrew Tap | |
| env: | |
| VERSION: ${{ steps.version.outputs.VERSION }} | |
| HOMEBREW_TAP_REPO: ${{ secrets.HOMEBREW_TAP_REPO }} | |
| HOMEBREW_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} | |
| run: | | |
| if [ -z "$HOMEBREW_TAP_REPO" ]; then | |
| echo "HOMEBREW_TAP_REPO not set, skipping" | |
| exit 0 | |
| fi | |
| # Install coreutils for sha256sum | |
| sudo apt-get update | |
| sudo apt-get install -y coreutils | |
| # Clone tap repo | |
| git clone "https://github.com/$HOMEBREW_TAP_REPO.git" /tmp/homebrew-tap | |
| cd /tmp/homebrew-tap | |
| # Calculate sha256 for macOS zip | |
| SHA256=$(sha256sum "$GITHUB_WORKSPACE/releases/lbpSSH-macos-universal.zip" | cut -d' ' -f1) | |
| # Update cask file | |
| perl -i -pe 's/version ".*?"/version "'"$VERSION"'"/' Casks/lbpssh.rb | |
| perl -i -pe 's/sha256 ".*?"/sha256 "'"$SHA256"'"/' Casks/lbpssh.rb | |
| perl -i -pe 's/sha256 :no_check/sha256 "'"$SHA256"'"/' Casks/lbpssh.rb | |
| # Commit and push | |
| git config user.name "GitHub Actions" | |
| git config user.email "actions@github.com" | |
| git add Casks/lbpssh.rb | |
| git commit -m "Update lbpssh to $VERSION" | |
| git push "https://$HOMEBREW_TOKEN@github.com/$HOMEBREW_TAP_REPO.git" |