Skip to content

Commit

Permalink
Change mac arm64 build use github runner (#2910)
Browse files Browse the repository at this point in the history
Co-authored-by: Hien To <[email protected]>
  • Loading branch information
hiento09 and hientominh committed May 16, 2024
1 parent 1130979 commit 33697be
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 27 deletions.
44 changes: 19 additions & 25 deletions .github/workflows/template-build-macos-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 41,7 @@ on:

jobs:
build-macos:
runs-on: macos-silicon
runs-on: macos-latest
environment: production
permissions:
contents: write
Expand All @@ -55,15 55,9 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 20
- name: Unblock keychain
run: |
security unlock-keychain -p ${{ secrets.KEYCHAIN_PASSWORD }} ~/Library/Keychains/login.keychain-db
# - uses: actions/setup-python@v5
# with:
# python-version: '3.11'

# - name: Install jq
# uses: dcarbone/[email protected]
- name: Install jq
uses: dcarbone/[email protected]

- name: Update app version based on latest release tag with build number
if: inputs.public_provider != 'github'
Expand Down Expand Up @@ -101,17 95,17 @@ jobs:
env:
VERSION_TAG: ${{ inputs.new_version }}

# - name: Get Cer for code signing
# run: base64 -d <<< "$CODE_SIGN_P12_BASE64" > /tmp/codesign.p12
# shell: bash
# env:
# CODE_SIGN_P12_BASE64: ${{ secrets.CODE_SIGN_P12_BASE64 }}
- name: Get Cer for code signing
run: base64 -d <<< "$CODE_SIGN_P12_BASE64" > /tmp/codesign.p12
shell: bash
env:
CODE_SIGN_P12_BASE64: ${{ secrets.CODE_SIGN_P12_BASE64 }}

# - uses: apple-actions/import-codesign-certs@v2
# continue-on-error: true
# with:
# p12-file-base64: ${{ secrets.CODE_SIGN_P12_BASE64 }}
# p12-password: ${{ secrets.CODE_SIGN_P12_PASSWORD }}
- uses: apple-actions/import-codesign-certs@v2
continue-on-error: true
with:
p12-file-base64: ${{ secrets.CODE_SIGN_P12_BASE64 }}
p12-password: ${{ secrets.CODE_SIGN_P12_PASSWORD }}

- name: Build and publish app to cloudflare r2 or github artifactory
if: inputs.public_provider != 'github'
Expand All @@ -125,9 119,9 @@ jobs:
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# CSC_LINK: "/tmp/codesign.p12"
# CSC_KEY_PASSWORD: ${{ secrets.CODE_SIGN_P12_PASSWORD }}
# CSC_IDENTITY_AUTO_DISCOVERY: "true"
CSC_LINK: "/tmp/codesign.p12"
CSC_KEY_PASSWORD: ${{ secrets.CODE_SIGN_P12_PASSWORD }}
CSC_IDENTITY_AUTO_DISCOVERY: "true"
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APP_PATH: "."
Expand All @@ -143,9 137,9 @@ jobs:
make build-and-publish
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# CSC_LINK: "/tmp/codesign.p12"
# CSC_KEY_PASSWORD: ${{ secrets.CODE_SIGN_P12_PASSWORD }}
# CSC_IDENTITY_AUTO_DISCOVERY: "true"
CSC_LINK: "/tmp/codesign.p12"
CSC_KEY_PASSWORD: ${{ secrets.CODE_SIGN_P12_PASSWORD }}
CSC_IDENTITY_AUTO_DISCOVERY: "true"
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APP_PATH: "."
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/template-build-macos-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 158,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: latest-mac-x64
path: ./electron/dist/latest-mac.yml

path: ./electron/dist/latest-mac.yml

0 comments on commit 33697be

Please sign in to comment.