Skip to content

Commit

Permalink
r0b08x [chore] 5/21/2024, 8:24:13 AM
Browse files Browse the repository at this point in the history
  • Loading branch information
p3x-robot committed May 21, 2024
1 parent 399d6c4 commit 859b3e9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 38 deletions.
50 changes: 15 additions & 35 deletions .github/workflows/macos-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,47 +24,27 @@ jobs:
- name: Install dependencies
run: npm install

- name: Decode certificates and profiles
run: |
echo "${{ secrets.MAS_CERTIFICATE_P12 }}" | base64 --decode > mac_app.p12
echo "${{ secrets.MAS_INSTALLER_CERTIFICATE_P12 }}" | base64 --decode > mac_installer.p12
echo "${{ secrets.MAS_PROVISIONING_PROFILE }}" | base64 --decode > p3xredisui.provisionprofile
echo "${{ secrets.CERTIFICATE_P12_BASE64 }}" | base64 --decode > certificate.p12
- name: Install Certificate
run: |
security create-keychain -p actions build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p actions build.keychain
security import mac_app.p12 -k build.keychain -P "$MAS_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
security import mac_installer.p12 -k build.keychain -P "$MAS_INSTALLER_CERTIFICATE_PASSWORD" -T /usr/bin/productsign
security import certificate.p12 -k build.keychain -P "$CERTIFICATE_P12_PASSWORD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k actions build.keychain
- name: Decode and Install Certificates
env:
CERTIFICATE_P12_BASE64: ${{ secrets.CERTIFICATE_P12_BASE64 }}
CERTIFICATE_P12_PASSWORD: ${{ secrets.CERTIFICATE_P12_PASSWORD }}
MAS_CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_P12_PASSWORD }}
MAS_INSTALLER_CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_P12_PASSWORD }}

- name: Setup Provisioning Profile
run: |
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp p3xredisui.provisionprofile ~/Library/MobileDevice/Provisioning\ Profiles/
- name: List Keychain Identities
run: security find-identity -v
- name: Build MAS Package
run: npm run publish-macos
echo $CERTIFICATE_P12_BASE64 | base64 --decode > certificate.p12
security create-keychain -p actions temp.keychain
security import certificate.p12 -k ~/Library/Keychains/temp.keychain -P "$CERTIFICATE_P12_PASSWORD" -T /usr/bin/codesign
security list-keychains -s temp.keychain
security default-keychain -s temp.keychain
security unlock-keychain -p actions temp.keychain
security set-key-partition-list -S apple-tool:,apple: -s -k actions temp.keychain
- name: Build and package macOS app
env:
CSC_LINK: file://mac_app.p12
CSC_KEY_PASSWORD: ${{ secrets.CERTIFICATE_P12_PASSWORD }}
CSC_INSTALLER_LINK: file://mac_installer.p12
CSC_INSTALLER_KEY_PASSWORD: ${{ secrets.CERTIFICATE_P12_PASSWORD }}
CSC_PROVISIONING_PROFILE: $(pwd)/p3xredisui.provisionprofile
APPLEID: ${{ secrets.APPLE_ID }}
APPLEIDPASS: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
DEBUG: "*"
run: npm run publish-macos

- name: List all files
run: ls -all -h dist
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@
"icon": "../src/electron/images/",
"target": "appimage"
},
"mac": {

"mac": {
"category": "public.app-category.developer-tools",
"hardenedRuntime": true,
"icon": "artifacts/apple/icons/redis.icns",
"gatekeeperAssess": false,
"identity": "Patrik László (3GB3S9SH84)",
"type": "distribution",
"extendInfo": {
"ElectronTeamID": "3GB3S9SH84"
},
Expand All @@ -139,7 +139,7 @@
},
"target": [
{
"target": "default",
"target": "mas",
"arch": [
"universal"
]
Expand Down

0 comments on commit 859b3e9

Please sign in to comment.