build(packaging): add macOS DMG & Windows NSIS with strict artifacts … #1
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: macOS DMG | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ "main" ] | |
| paths: [ "src/**", "scripts/build-and-package-macos.sh", "ecli.spec", "pyproject.toml" ] | |
| jobs: | |
| build-macos: | |
| runs-on: macos-13 # or macos-14 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Python deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install pyinstaller aiohttp aiosignal yarl multidict frozenlist python-dotenv toml chardet pyperclip wcwidth pygments tato PyYAML | |
| - name: Build DMG | |
| run: | | |
| sh ./scripts/build-and-package-macos.sh | |
| - name: Read version | |
| id: ver | |
| run: | | |
| VER=$(awk -F'"' '/^[[:space:]]*version[[:space:]]*=/ {print $2; exit}' pyproject.toml) | |
| echo "version=$VER" >> "$GITHUB_OUTPUT" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-dmg | |
| path: | | |
| releases/${{ steps.ver.outputs.version }}/ecli_${{ steps.ver.outputs.version }}_macos_*.* |