(fix): upgrade upload-artifact #80
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 Package for MacOS Apple Silicon | |
| on: | |
| push: | |
| tags: | |
| - '*.*.*' | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.9' | |
| - name: Download FFmpeg | |
| run: | | |
| curl -L https://evermeet.cx/ffmpeg/ffmpeg-7.1.zip -o ffmpeg.zip | |
| unzip ffmpeg.zip | |
| mv ffmpeg packaging/macos/ | |
| rm ffmpeg.zip | |
| - name: Install dependencies | |
| run: | | |
| python -m venv venv | |
| source venv/bin/activate | |
| python -m pip install --upgrade pip | |
| pip install pyinstaller | |
| pip install "pyobjc-framework-Quartz>=10.3.1,<10.4" | |
| pip install "pyobjc-framework-UniformTypeIdentifiers>=10.3.1,<10.4" | |
| pip install "pyobjc-framework-AVFoundation>=10.3.1,<10.4" | |
| pip install -r requirements.txt | |
| - name: Compile resources | |
| run: | | |
| source venv/bin/activate | |
| cd screenvivid | |
| python compile_resources.py | |
| - name: Build with PyInstaller | |
| run: | | |
| source venv/bin/activate | |
| cd packaging/macos | |
| pyinstaller --clean --noconfirm screenvivid.spec | |
| - name: Install create-dmg | |
| run: | | |
| brew install create-dmg | |
| - name: Create DMG | |
| run: | | |
| cd packaging/macos | |
| create-dmg \ | |
| --volname "ScreenVivid" \ | |
| --volicon "../../screenvivid/resources/icons/screenvivid.icns" \ | |
| --window-pos 0 0 \ | |
| --icon-size 100 \ | |
| --icon "ScreenVivid.app" 175 120 \ | |
| --hide-extension "ScreenVivid.app" \ | |
| --app-drop-link 425 120 \ | |
| "ScreenVivid-${{ github.ref_name }}-apple-silicon.dmg" \ | |
| "dist/ScreenVivid.app" | |
| mv ScreenVivid-${{ github.ref_name }}-apple-silicon.dmg ../.. | |
| - name: Upload DMG | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ScreenVivid-${{ github.ref_name }}-apple-silicon.dmg | |
| path: ./ScreenVivid-${{ github.ref_name }}-apple-silicon.dmg | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: ScreenVivid-${{ github.ref_name }}-apple-silicon.dmg | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |