Skip to content

Commit

Permalink
CI: try to sign macos pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
Thykof committed Dec 4, 2023
1 parent 8ed54ff commit 7f4e6c5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,13 @@ jobs:
with:
name: massastation_darwin_${{ matrix.arch }}_package
path: installer
- name: Import Code Signing Certificates
uses: apple-actions/import-codesign-certs@v2
with:
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE_DEV_BASE64 }}
p12-password: ${{ secrets.APPLE_CERTIFICATE_DEV_PASSWORD }}
- name: Build Package
run: sh macos/create_pkg.sh ${{ matrix.arch }}
run: sh macos/create_pkg.sh ${{ matrix.arch }} ${{ vars.APPLE_DEVELOPER_ID}}
env:
VERSION: ${{ env.VERSION }}
- name: Upload Package
Expand Down
4 changes: 3 additions & 1 deletion installer/macos/create_pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ ARCH=$1
MASSASTATION_INSTALLER_NAME=MassaStation.app
MASSASTATION_BINARY_NAME=massastation

APPLE_DEVELOPER_ID=$1 # "Developer ID Application: Massa Labs, Inc. (CODE)"

HOMEBREW_INSTALL_SCRIPT_URL=https://raw.githubusercontent.com/massalabs/homebrew.sh/master/homebrew-3.3.sh

LICENSE_FILE_NAME=MassaStation_ToS.rtf
Expand Down Expand Up @@ -51,7 +53,7 @@ package() {
pkgbuild --component $MASSASTATION_INSTALLER_NAME --identifier com.massalabs.massastation --version $PKGVERSION \
--scripts macos/scripts --install-location /Applications MassaStation.pkg || fatal "failed to create package"

productbuild --distribution macos/Distribution.dist --resources macos/resources --package-path . massastation_$PKGVERSION\_$ARCH.pkg || fatal "failed to create installer"
productbuild --distribution macos/Distribution.dist --resources macos/resources --package-path . --sign $APPLE_DEVELOPER_ID massastation_$PKGVERSION\_$ARCH.pkg || fatal "failed to create installer"
}

# Download homebrew installation script and put it in script directory.
Expand Down

0 comments on commit 7f4e6c5

Please sign in to comment.