Skip to content

Commit

Permalink
Don't sign OSX file
Browse files Browse the repository at this point in the history
  • Loading branch information
eljamm committed Nov 18, 2024
1 parent deb54de commit 72ac267
Showing 1 changed file with 32 additions and 33 deletions.
65 changes: 32 additions & 33 deletions .github/workflows/main-osx-arm64.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: 'Icestudio OSX ARM64'
name: "Icestudio OSX ARM64"

# Controls when the action will run.
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the develop branch
push:
branches: [ develop ]
branches: [develop]
pull_request:
branches: [ develop ]
branches: [develop]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -18,60 +18,59 @@ jobs:
# The type of runner that the job will run on
#runs-on: macos-10.15
runs-on: macOS-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Setup Nodejs version
uses: actions/setup-node@v3
with:
node-version: '21.1.0'
node-version: "21.1.0"

- name: Install npm dependencies
run: |
run: |
sed -i '' 's/darwinDependencies/dependencies/g' package.json
npm install --legacy-peer-deps
- name: Build OSX ARM64 packages
env:
MACOS_CERTIFICATE: ${{ secrets.APPLE_CERT_DATA }}
MACOS_CERTIFICATE_PWD: ${{ secrets.APPLE_CERT_PASSWORD }}
CODESIGN_ID: ${{ secrets.APPLE_TEAM_ID }}
MACOS_KEYCHAIN_PASS: ${{ secrets.LOCAL_KEYCHAIN_PASS }}
# env:
# MACOS_CERTIFICATE: ${{ secrets.APPLE_CERT_DATA }}
# MACOS_CERTIFICATE_PWD: ${{ secrets.APPLE_CERT_PASSWORD }}
# CODESIGN_ID: ${{ secrets.APPLE_TEAM_ID }}
# MACOS_KEYCHAIN_PASS: ${{ secrets.LOCAL_KEYCHAIN_PASS }}
run: |
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
security create-keychain -p $MACOS_KEYCHAIN_PASS build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p $MACOS_KEYCHAIN_PASS build.keychain
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $MACOS_KEYCHAIN_PASS build.keychain
# echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
# security create-keychain -p $MACOS_KEYCHAIN_PASS build.keychain
# security default-keychain -s build.keychain
# security unlock-keychain -p $MACOS_KEYCHAIN_PASS build.keychain
# security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
# security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $MACOS_KEYCHAIN_PASS build.keychain
npm run buildOSXARM64
ls dist/
# Loading vars from icestudio package.json
- id: icestudio_json
run: |
content=`tr '\n' ' ' < package.json`
echo "packageJson=${content}" >> $GITHUB_OUTPUT
echo "packageJson=${content}" >> $GITHUB_OUTPUT
# Timestamp for the build
- id: build_date
run: |
content=`tr '\n' ' ' < app/buildinfo.json`
echo "buildJson=${content}" >> $GITHUB_OUTPUT
- name: Sign DMG
env:
ICESTUDIO_VERSION: "${{fromJson(steps.icestudio_json.outputs.packageJson).version}}"
TIMESTAMP: "${{fromJson(steps.build_date.outputs.buildJson).ts}}"
MACOS_APPLE_UID: ${{ secrets.APPLE_TEAM_ID }}
run: |
codesign --force --deep --sign ${MACOS_APPLE_UID} dist/icestudio-${ICESTUDIO_VERSION}${TIMESTAMP}-osxarm64.dmg -v
- name: 'Upload DMG/OSX64'
# - name: Sign DMG
# env:
# ICESTUDIO_VERSION: "${{fromJson(steps.icestudio_json.outputs.packageJson).version}}"
# TIMESTAMP: "${{fromJson(steps.build_date.outputs.buildJson).ts}}"
# MACOS_APPLE_UID: ${{ secrets.APPLE_TEAM_ID }}
# run: |
# codesign --force --deep --sign ${MACOS_APPLE_UID} dist/icestudio-${ICESTUDIO_VERSION}${TIMESTAMP}-osxarm64.dmg -v

- name: "Upload DMG/OSX64"
env:
ICESTUDIO_VERSION: "${{fromJson(steps.icestudio_json.outputs.packageJson).version}}"
TIMESTAMP: "${{fromJson(steps.build_date.outputs.buildJson).ts}}"
Expand Down

0 comments on commit 72ac267

Please sign in to comment.