|
12 | 12 | release: |
13 | 13 | if: startsWith(github.ref, 'refs/tags/') |
14 | 14 | runs-on: ubuntu-latest |
15 | | - outputs: |
16 | | - upload_url: ${{ steps.create_release.outputs.upload_url }} |
17 | 15 |
|
18 | 16 | steps: |
19 | 17 | - name: Build Changelog |
@@ -78,58 +76,69 @@ jobs: |
78 | 76 | run: | |
79 | 77 | pip install . |
80 | 78 |
|
81 | | - - name: Install PyQt5 for macOS |
82 | | - shell: bash -l {0} |
83 | | - run: | |
84 | | - conda install -c conda-forge pyqt==5.15.7 |
85 | | - if: runner.os == 'macOS' |
86 | | - |
87 | 79 | - name: Run pyinstaller |
88 | 80 | shell: bash -l {0} |
89 | 81 | run: | |
90 | 82 | pip install pyinstaller |
91 | 83 | pyinstaller anylabeling.spec |
92 | 84 |
|
93 | | - - name: Upload release executable on macOS & Linux |
94 | | - id: upload_release_executable_macos_linux |
| 85 | + - name: Upload Linux/Windows Release Assets |
95 | 86 | uses: softprops/action-gh-release@v2 |
96 | 87 | env: |
97 | 88 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
98 | 89 | with: |
99 | | - upload_url: ${{ needs.release.outputs.upload_url }} |
100 | | - asset_path: ./dist/anylabeling |
101 | | - asset_name: AnyLabeling-${{ runner.os }}${{ matrix.device == 'GPU' && '-GPU' || '' }} |
102 | | - asset_content_type: application/octet-stream |
103 | | - if: runner.os != 'Windows' |
104 | | - |
105 | | - - name: Upload release executable on Windows |
106 | | - id: upload_release_executable_windows |
107 | | - uses: softprops/action-gh-release@v2 |
108 | | - env: |
109 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 90 | + files: | |
| 91 | + ./dist/anylabeling |
| 92 | + ./dist/anylabeling.exe |
| 93 | + fail_on_unmatched_files: false |
| 94 | + if: success() |
| 95 | + |
| 96 | + build_macos_folder: |
| 97 | + needs: [release] |
| 98 | + runs-on: macos-latest |
| 99 | + strategy: |
| 100 | + matrix: |
| 101 | + device: [CPU, GPU] |
| 102 | + |
| 103 | + steps: |
| 104 | + - uses: actions/checkout@v2 |
| 105 | + with: |
| 106 | + submodules: true |
| 107 | + |
| 108 | + - uses: conda-incubator/setup-miniconda@v2 |
110 | 109 | with: |
111 | | - upload_url: ${{ needs.release.outputs.upload_url }} |
112 | | - asset_path: ./dist/anylabeling.exe |
113 | | - asset_name: AnyLabeling${{ matrix.device == 'GPU' && '-GPU' || '' }}.exe |
114 | | - asset_content_type: application/octet-stream |
115 | | - if: runner.os == 'Windows' |
| 110 | + python-version: "3.10.14" |
| 111 | + miniconda-version: "latest" |
| 112 | + |
| 113 | + - name: Install main |
| 114 | + shell: bash -l {0} |
| 115 | + run: | |
| 116 | + pip install . |
| 117 | +
|
| 118 | + - name: Install PyQt5 for macOS |
| 119 | + shell: bash -l {0} |
| 120 | + run: | |
| 121 | + conda install -c conda-forge pyqt==5.15.7 |
| 122 | +
|
| 123 | + - name: Make build script executable |
| 124 | + shell: bash -l {0} |
| 125 | + run: | |
| 126 | + chmod +x scripts/build_macos_folder.sh |
116 | 127 |
|
117 | | - - name: Create dmg for macOS |
| 128 | + - name: Build in folder mode |
| 129 | + shell: bash -l {0} |
118 | 130 | run: | |
119 | | - npm install -g create-dmg |
120 | | - cd dist |
121 | | - create-dmg AnyLabeling.app || test -f AnyLabeling\ 0.0.0.dmg |
122 | | - mv AnyLabeling\ 0.0.0.dmg AnyLabeling${{ matrix.device == 'GPU' && '-GPU' || '' }}.dmg |
123 | | - if: runner.os == 'macOS' |
124 | | - |
125 | | - - name: Upload release app on macOS |
126 | | - id: upload_release_app_macos |
| 131 | + ./scripts/build_macos_folder.sh ${{ matrix.device }} |
| 132 | +
|
| 133 | + - name: Create zip archive |
| 134 | + shell: bash -l {0} |
| 135 | + run: | |
| 136 | + cd dist && zip -r AnyLabeling-Folder${{ matrix.device == 'GPU' && '-GPU' || '' }}.zip AnyLabeling-Folder${{ matrix.device == 'GPU' && '-GPU' || '' }}/ |
| 137 | +
|
| 138 | + - name: Upload macOS Folder Build Assets |
127 | 139 | uses: softprops/action-gh-release@v2 |
128 | 140 | env: |
129 | 141 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
130 | 142 | with: |
131 | | - upload_url: ${{ needs.release.outputs.upload_url }} |
132 | | - asset_path: ./dist/AnyLabeling${{ matrix.device == 'GPU' && '-GPU' || '' }}.dmg |
133 | | - asset_name: AnyLabeling${{ matrix.device == 'GPU' && '-GPU' || '' }}.dmg |
134 | | - asset_content_type: application/octet-stream |
135 | | - if: runner.os == 'macOS' |
| 143 | + files: ./dist/AnyLabeling-Folder${{ matrix.device == 'GPU' && '-GPU' || '' }}.zip |
| 144 | + if: success() |
0 commit comments