-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
308 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- feature/ready-to-release | ||
# @see: https://dev.to/erikhofer/build-and-publish-a-multi-platform-electron-app-on-github-3lnd | ||
# on: | ||
# push: | ||
# tags: | ||
# - 'v*' | ||
|
||
jobs: | ||
publish_on_linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: 'yarn' | ||
- name: install dependencies | ||
run: yarn install | ||
- name: build | ||
run: yarn run make | ||
# - name: publish | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# run: yarn run publish | ||
|
||
publish_on_mac: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- name: install dependencies | ||
run: yarn install | ||
# see: https://dev.to/rwwagner90/signing-electron-apps-with-github-actions-4cof | ||
- name: Add MacOS certs | ||
run: chmod +x add-osx-cert.sh && ./add-osx-cert.sh | ||
env: | ||
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }} | ||
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }} | ||
- name: Add api key file | ||
run: | | ||
echo "${{ secrets.APPLE_API_KEY_CONTENT }}" > authKey.p8 | ||
APPLE_API_KEY=$(realpath authKey.p8) | ||
echo "APPLE_API_KEY=$APPLE_API_KEY" >> $GITHUB_ENV | ||
- name: build | ||
env: | ||
APPLE_API_KEY: ${{ env.APPLE_API_KEY }} | ||
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }} | ||
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} | ||
run: DEBUG=* yarn run make | ||
# - name: publish | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# run: yarn run publish | ||
|
||
publish_on_win: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- name: install dependencies | ||
run: yarn install | ||
- name: build | ||
run: yarn run make | ||
# - name: publish | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# run: yarn run publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env sh | ||
|
||
# see: https://dev.to/rwwagner90/signing-electron-apps-with-github-actions-4cof | ||
KEY_CHAIN=build.keychain | ||
CERTIFICATE_P12=certificate.p12 | ||
|
||
# Recreate the certificate from the secure environment variable | ||
echo $CERTIFICATE_OSX_APPLICATION | base64 --decode > $CERTIFICATE_P12 | ||
|
||
#create a keychain | ||
security create-keychain -p actions $KEY_CHAIN | ||
|
||
# Make the keychain the default so identities are found | ||
security default-keychain -s $KEY_CHAIN | ||
|
||
# Unlock the keychain | ||
security unlock-keychain -p actions $KEY_CHAIN | ||
|
||
security import $CERTIFICATE_P12 -k $KEY_CHAIN -P $CERTIFICATE_PASSWORD -T /usr/bin/codesign; | ||
|
||
security set-key-partition-list -S apple-tool:,apple: -s -k actions $KEY_CHAIN | ||
|
||
# remove certs | ||
rm -fr *.p12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.