Build Swift Munki Release (Manual) #105
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 Swift Munki Release (Manual) | |
| env: | |
| APP_SIGNING_IDENTITY: "Developer ID Application: Mac Admins Open Source (T4SK8ZXCXG)" | |
| INSTALLER_SIGNING_IDENTITY: "Developer ID Installer: Mac Admins Open Source (T4SK8ZXCXG)" | |
| NOTARY_APP_PASSWORD: ${{ secrets.NOTARY_APP_PASSWORD_MAOS }} | |
| REVISION: 5df8be8e0136e3a5d392443edb71b7bde48ed6ce # -- hardcoded for now | |
| XCODE_PATH: "/Applications/Xcode_26.6.app" | |
| on: [workflow_dispatch] | |
| jobs: | |
| build: | |
| runs-on: macos-26 | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.1.0 | |
| with: | |
| fetch-depth: 0 | |
| path: munki-builds | |
| - name: Checkout munki repo | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.1.0 | |
| with: | |
| fetch-depth: 0 | |
| path: munki | |
| ref: ${{env.REVISION}} | |
| repository: munki/munki | |
| - name: Install Apple Xcode certificates | |
| uses: apple-actions/import-codesign-certs@5142e029c445c10ffc7149d172e540235a065466 # v7 | |
| with: | |
| keychain-password: ${{ github.run_id }} | |
| p12-file-base64: ${{ secrets.APP_CERTIFICATES_P12_MAOS }} | |
| p12-password: ${{ secrets.APP_CERTIFICATES_P12_PASSWORD_MAOS }} | |
| - name: Install Apple Installer certificates | |
| uses: apple-actions/import-codesign-certs@5142e029c445c10ffc7149d172e540235a065466 # v7 | |
| with: | |
| create-keychain: false # do not create a new keychain for this value | |
| keychain-password: ${{ github.run_id }} | |
| p12-file-base64: ${{ secrets.PKG_CERTIFICATES_P12_MAOS }} | |
| p12-password: ${{ secrets.PKG_CERTIFICATES_P12_PASSWORD_MAOS }} | |
| - name: Set Xcode Version | |
| run: sudo xcode-select -s "$XCODE_PATH" | |
| - name: Build munki package | |
| run: | | |
| cd ./munki | |
| ./code/tools/make_swift_munki_pkg.sh -P -S "$APP_SIGNING_IDENTITY" -s "$INSTALLER_SIGNING_IDENTITY" | |
| echo "MUNKI_PKG_PATH=$(find . -type f -name "*.pkg")" >> $GITHUB_ENV | |
| echo "MUNKI_VERSION=$(find . -type f -name "*.pkg" | sed 's/[^\-]*-//' | sed 's/\.[^.]*$//')" >> $GITHUB_ENV | |
| - name: Notarize and staple package | |
| id: notarize_and_staple | |
| run: | | |
| "$XCODE_PATH/Contents/Developer/usr/bin/notarytool" store-credentials --apple-id "opensource@macadmins.io" --team-id "T4SK8ZXCXG" --password "$NOTARY_APP_PASSWORD" munki | |
| "$XCODE_PATH/Contents/Developer/usr/bin/notarytool" submit "./munki/$MUNKI_PKG_PATH" --keychain-profile "munki" --wait | |
| "$XCODE_PATH/Contents/Developer/usr/bin/stapler" staple "./munki/$MUNKI_PKG_PATH" | |
| - name: Generate changelog | |
| if: ${{ false }} # disable job for now | |
| id: changelog | |
| uses: metcalfc/changelog-generator@afdcb9470aebdb2252c0c95a1c130723c9e21f3a # v4.1 | |
| with: | |
| myToken: ${{ secrets.GITHUB_TOKEN }} | |
| reverse: 'true' | |
| - name: Create Release | |
| id: create_release | |
| uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2 | |
| with: | |
| name: Munki v${{env.MUNKI_VERSION}} | |
| tag_name: v${{env.MUNKI_VERSION}} | |
| draft: false | |
| prerelease: true | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| body: | | |
| This is a signed and notarized beta build of Munki 7. | |
| files: ${{github.workspace}}/munki/*.pkg |