Update Flutter Release Action #47
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: Release Flutter Platform | ||
| on: | ||
| push: | ||
| tags: | ||
| - "*" | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: false | ||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| token: ${{ secrets.PELAGORNIS }} | ||
| fetch-depth: 0 | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: "3.11" | ||
| - name: Setup Flutter | ||
| uses: subosito/flutter-action@v2 | ||
| with: | ||
| flutter-version: "3.19.0" | ||
| channel: "stable" | ||
| - name: Configure Flutter | ||
| run: | | ||
| flutter config --no-analytics | ||
| flutter config --no-cli-animations | ||
| - name: Install Python dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt | ||
| - name: Get version | ||
| id: get_version | ||
| run: | | ||
| VERSION=${GITHUB_REF#refs/tags/} | ||
| echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
| echo "Version: $VERSION" | ||
| - name: Update Flutter version | ||
| run: | | ||
| VERSION="${{ steps.get_version.outputs.version }}" | ||
| sed -i "s/^version:.*/version: $VERSION/" flutter/pubspec.yaml | ||
| echo "✅ Updated Flutter version to $VERSION" | ||
| - name: Update Flutter CHANGELOG | ||
| run: | | ||
| VERSION="${{ steps.get_version.outputs.version }}" | ||
| cat > /tmp/changelog_entry.md << EOF | ||
| ## $VERSION | ||
| - Updated all platform versions to $VERSION | ||
| - Fixed React Native build errors and TypeScript conflicts | ||
| - Improved icon generation scripts for better consistency | ||
| - Enhanced package validation and publishing process | ||
| - Fixed Git push conflicts in release workflows | ||
| - Added concurrency controls to prevent workflow conflicts | ||
| EOF | ||
| cat /tmp/changelog_entry.md flutter/CHANGELOG.md > /tmp/new_changelog.md | ||
| mv /tmp/new_changelog.md flutter/CHANGELOG.md | ||
| rm -f /tmp/changelog_entry.md | ||
| echo "✅ Updated Flutter CHANGELOG.md with version $VERSION" | ||
| - name: Commit version & changelog to main | ||
| run: | | ||
| VERSION="${{ steps.get_version.outputs.version }}" | ||
| git config --local user.email "action@github.com" | ||
| git config --local user.name "GitHub Action" | ||
| git config --local init.defaultBranch main | ||
| # Ensure we're on main branch | ||
| git checkout main | ||
| git add flutter/pubspec.yaml flutter/CHANGELOG.md | ||
| git commit -m "chore(flutter): bump version to $VERSION | ||
| - Update flutter/pubspec.yaml version field | ||
| - Update flutter/CHANGELOG.md with version $VERSION notes | ||
| - Triggered by tag: ${{ github.ref }} | ||
| - Workflow: ${{ github.workflow }} | ||
| - Commit: ${{ github.sha }}" | ||
| # Try to push, if fails, pull and retry | ||
| for i in {1..3}; do | ||
| if git push origin HEAD:main; then | ||
| echo "✅ Successfully pushed version changes" | ||
| break | ||
| else | ||
| echo "Push failed, attempt $i/3. Pulling latest changes..." | ||
| git pull origin main --rebase | ||
| sleep 2 | ||
| fi | ||
| done | ||
| echo "✅ Committed version bump to main" | ||
| - name: Build Flutter platform | ||
| run: | | ||
| python3 scripts/generate_flutter_dart.py | ||
| - name: Get Flutter dependencies | ||
| run: | | ||
| cd flutter | ||
| flutter pub get | ||
| cd example | ||
| flutter pub get | ||
| - name: Create Flutter Release | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| tag_name: ${{ steps.get_version.outputs.version }} | ||
| body: | | ||
| ## 🎉 Flutter Platform Release ${{ steps.get_version.outputs.version }} | ||
| ### 📦 Installation | ||
| ```yaml | ||
| dependencies: | ||
| refineui_system_icons: ^${{ steps.get_version.outputs.version }} | ||
| ``` | ||
| ### 🦋 Features | ||
| - Flutter-optimized components | ||
| - Material Design compatible | ||
| - Cross-platform consistency | ||
| - 434+ icons with multiple sizes and styles | ||
| - High-performance rendering | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.PELAGORNIS }} | ||
| publish: | ||
| needs: release | ||
| permissions: | ||
| id-token: write # Required for authentication using OIDC | ||
| contents: read | ||
| uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 | ||
| with: | ||
| package_path: flutter | ||
| 
         Check failure on line 151 in .github/workflows/release-flutter.yml 
    
   | 
||
| publish_to: pub.dev | ||