mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
Merge pull request #1292 from TriliumNext/bugfix/macos-fix2
Pass the required `APPLE` secrets to the `build-electron` action
This commit is contained in:
commit
47f84fe4b4
34
.github/workflows/main.yml
vendored
34
.github/workflows/main.yml
vendored
@ -33,36 +33,6 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os.image }}
|
runs-on: ${{ matrix.os.image }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# Set up certificates and keychain for macOS
|
|
||||||
- name: Install Apple Certificates
|
|
||||||
if: matrix.os.name == 'macos'
|
|
||||||
env:
|
|
||||||
APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
|
|
||||||
APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
|
|
||||||
INSTALLER_CERTIFICATE_BASE64: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
|
|
||||||
INSTALLER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
|
|
||||||
KEYCHAIN_PASSWORD: ${{ github.run_id }}
|
|
||||||
run: |
|
|
||||||
# Create keychain
|
|
||||||
security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
|
|
||||||
security default-keychain -s build.keychain
|
|
||||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
|
|
||||||
security set-keychain-settings -t 3600 -u build.keychain
|
|
||||||
|
|
||||||
# Import application certificate
|
|
||||||
echo "$APP_CERTIFICATE_BASE64" | base64 --decode > application.p12
|
|
||||||
security import application.p12 -k build.keychain -P "$APP_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
|
|
||||||
rm application.p12
|
|
||||||
|
|
||||||
# Import installer certificate
|
|
||||||
echo "$INSTALLER_CERTIFICATE_BASE64" | base64 --decode > installer.p12
|
|
||||||
security import installer.p12 -k build.keychain -P "$INSTALLER_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
|
|
||||||
rm installer.p12
|
|
||||||
|
|
||||||
# Update keychain settings
|
|
||||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain
|
|
||||||
|
|
||||||
- name: Set up node & dependencies
|
- name: Set up node & dependencies
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
@ -74,6 +44,10 @@ jobs:
|
|||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
extension: ${{ matrix.os.extension }}
|
extension: ${{ matrix.os.extension }}
|
||||||
env:
|
env:
|
||||||
|
APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
|
||||||
|
APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
|
||||||
|
APPLE_INSTALLER_CERTIFICATE_BASE64: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
|
||||||
|
APPLE_INSTALLER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
|
||||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
|
10
.github/workflows/nightly.yml
vendored
10
.github/workflows/nightly.yml
vendored
@ -2,7 +2,7 @@ name: Nightly Release
|
|||||||
on:
|
on:
|
||||||
# This can be used to automatically publish nightlies at UTC nighttime
|
# This can be used to automatically publish nightlies at UTC nighttime
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 2 * * *' # run at 2 AM UTC
|
- cron: "0 2 * * *" # run at 2 AM UTC
|
||||||
# This can be used to allow manually triggering nightlies from the web interface
|
# This can be used to allow manually triggering nightlies from the web interface
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
env:
|
env:
|
||||||
@ -45,6 +45,14 @@ jobs:
|
|||||||
os: ${{ matrix.os.name }}
|
os: ${{ matrix.os.name }}
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
extension: ${{ join(matrix.os.extension, ' ') }}
|
extension: ${{ join(matrix.os.extension, ' ') }}
|
||||||
|
env:
|
||||||
|
APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
|
||||||
|
APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
|
||||||
|
APPLE_INSTALLER_CERTIFICATE_BASE64: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
|
||||||
|
APPLE_INSTALLER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
|
||||||
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||||
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
|
|
||||||
- name: Publish release
|
- name: Publish release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user