|
| 1 | +name: Build and Release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - 'copilot/**' |
| 7 | + workflow_dispatch: |
| 8 | + inputs: |
| 9 | + create-release: |
| 10 | + description: 'Create a GitHub Release with the built artifacts' |
| 11 | + type: boolean |
| 12 | + default: true |
| 13 | + |
| 14 | +concurrency: |
| 15 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 16 | + cancel-in-progress: true |
| 17 | + |
| 18 | +env: |
| 19 | + ver: '' |
| 20 | + ver_pure: '' |
| 21 | + |
| 22 | +jobs: |
| 23 | + # ──────────────────────────── Linux ──────────────────────────── |
| 24 | + build_linux: |
| 25 | + name: Build Linux (Ubuntu 24.04) |
| 26 | + runs-on: ubuntu-24.04 |
| 27 | + |
| 28 | + steps: |
| 29 | + - name: Checkout |
| 30 | + uses: actions/checkout@v6 |
| 31 | + with: |
| 32 | + lfs: 'true' |
| 33 | + |
| 34 | + - name: Get version |
| 35 | + id: ver |
| 36 | + run: | |
| 37 | + ver_pure=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2) |
| 38 | + ref="${{ github.ref_name }}" |
| 39 | + safe_ref="${ref//\//-}" |
| 40 | + ver="dev-${safe_ref}-$(date +'%Y%m%d')" |
| 41 | + echo "ver=$ver" >> $GITHUB_ENV |
| 42 | + echo "ver_pure=$ver_pure" >> $GITHUB_ENV |
| 43 | + echo "ver=$ver" >> $GITHUB_OUTPUT |
| 44 | +
|
| 45 | + - name: Install system dependencies |
| 46 | + uses: ./.github/actions/apt-install-deps |
| 47 | + |
| 48 | + - name: Cache deps |
| 49 | + id: cache-deps |
| 50 | + uses: actions/cache@v5 |
| 51 | + with: |
| 52 | + path: ${{ github.workspace }}/deps/build/destdir |
| 53 | + key: ubuntu-24.04-orcaslicer-deps-${{ hashFiles('deps/**') }} |
| 54 | + |
| 55 | + - name: Build dependencies (if not cached) |
| 56 | + if: steps.cache-deps.outputs.cache-hit != 'true' |
| 57 | + run: | |
| 58 | + mkdir -p ${{ github.workspace }}/deps/build/destdir |
| 59 | + ./build_linux.sh -dr |
| 60 | +
|
| 61 | + - uses: lukka/get-cmake@latest |
| 62 | + with: |
| 63 | + cmakeVersion: "~3.28.0" |
| 64 | + |
| 65 | + - name: Build OrcaSlicer + AppImage |
| 66 | + run: | |
| 67 | + ./build_linux.sh -istr |
| 68 | + mv -n ./build/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage \ |
| 69 | + ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage |
| 70 | + chmod +x ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage |
| 71 | +
|
| 72 | + - name: Upload Linux AppImage |
| 73 | + uses: actions/upload-artifact@v6 |
| 74 | + with: |
| 75 | + name: OrcaSlicer-Linux-${{ env.ver }} |
| 76 | + path: ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage |
| 77 | + if-no-files-found: error |
| 78 | + |
| 79 | + # ──────────────────────────── Windows ──────────────────────────── |
| 80 | + build_windows: |
| 81 | + name: Build Windows |
| 82 | + runs-on: windows-latest |
| 83 | + |
| 84 | + steps: |
| 85 | + - name: Checkout |
| 86 | + uses: actions/checkout@v6 |
| 87 | + with: |
| 88 | + lfs: 'true' |
| 89 | + |
| 90 | + - name: Get version |
| 91 | + id: ver |
| 92 | + shell: pwsh |
| 93 | + run: | |
| 94 | + $ver_pure_match = Select-String -Path version.inc -Pattern 'set\(SoftFever_VERSION "(.*?)"\)' |
| 95 | + $ver_pure = $ver_pure_match.Matches[0].Groups[1].Value |
| 96 | + $ref = "${{ github.ref_name }}" -replace '/', '-' |
| 97 | + $date = Get-Date -Format 'yyyyMMdd' |
| 98 | + $ver = "dev-$ref-$date" |
| 99 | + echo "ver=$ver" | Out-File -Append $env:GITHUB_ENV |
| 100 | + echo "ver_pure=$ver_pure" | Out-File -Append $env:GITHUB_ENV |
| 101 | +
|
| 102 | + - uses: microsoft/setup-msbuild@v2 |
| 103 | + |
| 104 | + - uses: lukka/get-cmake@latest |
| 105 | + with: |
| 106 | + cmakeVersion: "~3.28.0" |
| 107 | + |
| 108 | + - name: Install Strawberry Perl |
| 109 | + run: choco install strawberryperl |
| 110 | + |
| 111 | + - name: Install NSIS |
| 112 | + run: choco install nsis |
| 113 | + |
| 114 | + - name: Cache deps |
| 115 | + id: cache-deps |
| 116 | + uses: actions/cache@v5 |
| 117 | + with: |
| 118 | + path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep |
| 119 | + key: windows-latest-orcaslicer-deps-${{ hashFiles('deps/**') }} |
| 120 | + |
| 121 | + - name: Build dependencies (if not cached) |
| 122 | + if: steps.cache-deps.outputs.cache-hit != 'true' |
| 123 | + env: |
| 124 | + WindowsSdkDir: 'C:\Program Files (x86)\Windows Kits\10\' |
| 125 | + WindowsSDKVersion: '10.0.26100.0\' |
| 126 | + run: | |
| 127 | + .\build_release_vs.bat deps |
| 128 | + .\build_release_vs.bat pack |
| 129 | +
|
| 130 | + - name: Build OrcaSlicer |
| 131 | + env: |
| 132 | + WindowsSdkDir: 'C:\Program Files (x86)\Windows Kits\10\' |
| 133 | + WindowsSDKVersion: '10.0.26100.0\' |
| 134 | + run: .\build_release_vs.bat slicer |
| 135 | + |
| 136 | + - name: Create NSIS installer |
| 137 | + working-directory: ${{ github.workspace }}/build |
| 138 | + run: cpack -G NSIS |
| 139 | + |
| 140 | + - name: Pack portable zip |
| 141 | + working-directory: ${{ github.workspace }}/build |
| 142 | + shell: cmd |
| 143 | + run: | |
| 144 | + "C:/Program Files/7-Zip/7z.exe" a -tzip OrcaSlicer_Windows_${{ env.ver }}_portable.zip OrcaSlicer |
| 145 | +
|
| 146 | + - name: Upload Windows installer |
| 147 | + uses: actions/upload-artifact@v6 |
| 148 | + with: |
| 149 | + name: OrcaSlicer-Windows-Installer-${{ env.ver }} |
| 150 | + path: ${{ github.workspace }}/build/OrcaSlicer*.exe |
| 151 | + if-no-files-found: error |
| 152 | + |
| 153 | + - name: Upload Windows portable zip |
| 154 | + uses: actions/upload-artifact@v6 |
| 155 | + with: |
| 156 | + name: OrcaSlicer-Windows-Portable-${{ env.ver }} |
| 157 | + path: ${{ github.workspace }}/build/OrcaSlicer_Windows_${{ env.ver }}_portable.zip |
| 158 | + if-no-files-found: error |
| 159 | + |
| 160 | + # ──────────────────────────── macOS ──────────────────────────── |
| 161 | + build_macos: |
| 162 | + name: Build macOS (arm64) |
| 163 | + runs-on: macos-14 |
| 164 | + |
| 165 | + steps: |
| 166 | + - name: Checkout |
| 167 | + uses: actions/checkout@v6 |
| 168 | + with: |
| 169 | + lfs: 'true' |
| 170 | + |
| 171 | + - name: Get version |
| 172 | + id: ver |
| 173 | + run: | |
| 174 | + ver_pure=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2) |
| 175 | + ref="${{ github.ref_name }}" |
| 176 | + safe_ref="${ref//\//-}" |
| 177 | + ver="dev-${safe_ref}-$(date +'%Y%m%d')" |
| 178 | + echo "ver=$ver" >> $GITHUB_ENV |
| 179 | + echo "ver_pure=$ver_pure" >> $GITHUB_ENV |
| 180 | +
|
| 181 | + - name: Install tools |
| 182 | + run: brew install libtool automake texinfo |
| 183 | + |
| 184 | + - name: Cache deps |
| 185 | + id: cache-deps |
| 186 | + uses: actions/cache@v5 |
| 187 | + with: |
| 188 | + path: ${{ github.workspace }}/deps/build |
| 189 | + key: macos-14-arm64-orcaslicer-deps-${{ hashFiles('deps/**') }} |
| 190 | + |
| 191 | + - name: Build dependencies (if not cached) |
| 192 | + if: steps.cache-deps.outputs.cache-hit != 'true' |
| 193 | + run: | |
| 194 | + mkdir -p ${{ github.workspace }}/deps/build |
| 195 | + ./build_release_macos.sh -dx -1 -a universal -t 10.15 |
| 196 | +
|
| 197 | + - uses: lukka/get-cmake@latest |
| 198 | + with: |
| 199 | + cmakeVersion: "~3.28.0" |
| 200 | + |
| 201 | + - name: Build OrcaSlicer |
| 202 | + run: ./build_release_macos.sh -s -n -x -1 -a universal -t 10.15 |
| 203 | + |
| 204 | + - name: Upload macOS DMG |
| 205 | + uses: actions/upload-artifact@v6 |
| 206 | + with: |
| 207 | + name: OrcaSlicer-macOS-${{ env.ver }} |
| 208 | + path: ${{ github.workspace }}/build/OrcaSlicer*.dmg |
| 209 | + if-no-files-found: error |
| 210 | + |
| 211 | + # ──────────────────────────── Create Release ──────────────────────────── |
| 212 | + create_release: |
| 213 | + name: Create GitHub Release |
| 214 | + needs: [build_linux, build_windows, build_macos] |
| 215 | + runs-on: ubuntu-24.04 |
| 216 | + if: ${{ !cancelled() && (github.event_name == 'workflow_dispatch' && inputs.create-release || github.event_name == 'push') }} |
| 217 | + permissions: |
| 218 | + contents: write |
| 219 | + |
| 220 | + steps: |
| 221 | + - name: Checkout |
| 222 | + uses: actions/checkout@v6 |
| 223 | + |
| 224 | + - name: Get version |
| 225 | + run: | |
| 226 | + ver_pure=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2) |
| 227 | + ref="${{ github.ref_name }}" |
| 228 | + safe_ref="${ref//\//-}" |
| 229 | + ver="dev-${safe_ref}-$(date +'%Y%m%d')" |
| 230 | + echo "ver=$ver" >> $GITHUB_ENV |
| 231 | + echo "ver_pure=$ver_pure" >> $GITHUB_ENV |
| 232 | +
|
| 233 | + - name: Download all artifacts |
| 234 | + uses: actions/download-artifact@v7 |
| 235 | + with: |
| 236 | + path: release-artifacts |
| 237 | + |
| 238 | + - name: List artifacts |
| 239 | + run: find release-artifacts -type f | sort |
| 240 | + |
| 241 | + - name: Create Release |
| 242 | + uses: softprops/action-gh-release@v2 |
| 243 | + with: |
| 244 | + tag_name: ${{ env.ver }} |
| 245 | + name: "OrcaSlicer ${{ env.ver_pure }} with Resin-like Supports" |
| 246 | + body: | |
| 247 | + ## OrcaSlicer with Resin-like Supports |
| 248 | +
|
| 249 | + This release includes the **Resin-like (auto)** support type — thin-pillar, point-contact supports inspired by SLA/resin printers for easy removal on FDM printers. |
| 250 | +
|
| 251 | + ### Downloads |
| 252 | + | Platform | File | |
| 253 | + |---|---| |
| 254 | + | Windows | `OrcaSlicer*.exe` (installer) or `*_portable.zip` | |
| 255 | + | Linux | `OrcaSlicer_Linux_*.AppImage` | |
| 256 | + | macOS | `OrcaSlicer*.dmg` | |
| 257 | +
|
| 258 | + ### Changes |
| 259 | + - New **Resin-like (auto)** entry in the Support Type dropdown |
| 260 | + - Uses the organic tree-support kernel with SLA-inspired parameters: |
| 261 | + - Pin-head contact tips (= 1 extrusion line wide) |
| 262 | + - Thin branch pillars (≤ 2× line width) |
| 263 | + - 30% tip density for reliable overhang coverage |
| 264 | + - 1-layer interface for minimal contact area |
| 265 | + draft: false |
| 266 | + prerelease: true |
| 267 | + files: | |
| 268 | + release-artifacts/**/*.AppImage |
| 269 | + release-artifacts/**/*.exe |
| 270 | + release-artifacts/**/*.zip |
| 271 | + release-artifacts/**/*.dmg |
| 272 | + env: |
| 273 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments