Enable GitHub Pages automatically in docs workflow #28
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| build-test: | |
| name: Build, test, package | |
| runs-on: macos-latest | |
| env: | |
| CI_REQUIRE_SIGNED_PACKAGE: "0" | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Cache build artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| .build | |
| ~/Library/Caches/org.swift.swiftpm | |
| key: ${{ runner.os }}-swift-${{ hashFiles('Package.swift') }}-${{ hashFiles('Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-swift- | |
| - name: Show toolchain | |
| run: swift --version | |
| - name: Validate scripts | |
| run: | | |
| sh -n Scripts/build-app.sh | |
| sh -n Scripts/install-local.sh | |
| sh -n Scripts/package-release.sh | |
| sh -n Scripts/verify-package.sh | |
| sh -n Scripts/sign-notarize-package.sh | |
| - name: Build | |
| run: make build | |
| - name: Test | |
| run: make test | |
| - name: Build app bundles | |
| run: make app | |
| - name: Build installer package | |
| run: make package | |
| - name: Build summary | |
| run: | | |
| find dist -maxdepth 1 -name 'DevStackMenu-*.pkg' -type f | sort | |
| PKG_PATH="$(find dist -maxdepth 1 -name 'DevStackMenu-*.pkg' -type f | sort | head -n 1)" | |
| pkgutil --expand "$PKG_PATH" /tmp/devstackmenu-pkg-expanded | |
| ls -la /tmp/devstackmenu-pkg-expanded | |
| ./Scripts/verify-package.sh "$PKG_PATH" "$CI_REQUIRE_SIGNED_PACKAGE" | |
| - name: Install package (smoke) | |
| run: | | |
| PKG_PATH="$(find dist -maxdepth 1 -name 'DevStackMenu-*.pkg' -type f | sort | head -n 1)" | |
| sudo installer -pkg "$PKG_PATH" -target / | |
| [ -x /usr/local/bin/dx ] | |
| [ -d /Applications/DevStackMenu.app ] | |
| - name: Remove temporary install artifacts | |
| if: always() | |
| run: | | |
| rm -rf /tmp/devstackmenu-pkg-expanded | |
| sudo rm -rf /Applications/DevStackMenu.app | |
| sudo rm -rf /Applications/Import\ Compose\ To\ DX.app | |
| sudo rm -f /usr/local/bin/dx |