v1.6: Улучшения безопасности, производительности и стабильности #6
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: Build and Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Запускается при создании тега, начинающегося с 'v' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Tag to build (e.g., v1.4)' | |
| required: true | |
| type: string | |
| jobs: | |
| build-and-release: | |
| runs-on: macos-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Build universal binary | |
| run: | | |
| chmod +x ./scripts/build-universal.sh | |
| ./scripts/build-universal.sh | |
| - name: Verify app exists | |
| run: | | |
| if [ ! -d "build/export/MegaplanHepler.app" ]; then | |
| echo "❌ Ошибка: приложение не найдено в build/export/" | |
| ls -la build/export/ | |
| exit 1 | |
| fi | |
| echo "✅ Приложение найдено: build/export/MegaplanHepler.app" | |
| du -sh build/export/MegaplanHepler.app | |
| - name: Create release archive | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| cd build/export | |
| zip -r "MegaplanHelper-v${VERSION}.zip" MegaplanHepler.app | |
| cd ../.. | |
| echo "✅ Архив создан: build/export/MegaplanHelper-v${VERSION}.zip" | |
| ls -lh build/export/*.zip | |
| - name: Upload release asset | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: build/export/MegaplanHelper-v*.zip | |
| draft: false | |
| prerelease: false | |
| tag_name: ${{ github.ref_name }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |