mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2024-11-19 09:52:09 +01:00
76694a55e9
* Github electron release workflow * Remove setup-node working-directory * Suredbits Wallet linux workflow * Build Mac krystalbull, Windows setup/install monorepo * Build Mac Suredbits Wallet * Test sign Electron Krystal Bull app * Try fixed path * Try different env var notation * Change env var access notation * Change env var access notation * Add "$VAR" * Quote more variables * Test sign oracle-electron dmg directly * Change comment * Try again * Try again * Test build dep * Test * Test pull .zip artifact from previous build step * Build after adding artifact folder support * Matrix zips building * os.target -> matrix.target * Remove unused os references * matrix zips and electron builds * Add oses * shell: bash * shell: bash * view artifacts * Magic colon * Add back javafx builds * Optimize zip builds? * Fix linux electron suredbits wallet * Single build * Separate JavaFX builds and cleanup * Test sign wallet * Take out non-mac builds for now * Test build * Test build with wildcard names directly * Test build with wildcard names directly * Test non-wildcard build * Test keystore auth * Test keychain again * Try email as keychain key * JavaFX build * Try to notarize with keychain * test notarize from keychain on javafx * Try different keychain item name * Try another keychain item name * Test another keychain key * Try another key * Test Krystal Bull Electron signing/notarization * Test keychain unlock and Team Id * Import certs * Test * Test * test * test * Test with keychain notarize * Test * Test short signing id * Manually sign .app * Try again * Try again * Try again * Echo * Echo * Echo * Echo * server oracle electron build/sign/notarize * manually sign after electron build * Again * Again * Again * Again * Test staple * Again * Again * Adjust password notarizing * Sign dmg * Only sign dmg * Test implied matrix.* env var * Sign app, sign dmg * Again * Electron native signing with keychain name * again * Make signing_temp.keychain before electron build * Change keychain to signing_temp * Back to signing_temp.keychain * Notarize .zip * Remove electron signing * Add notarytool commands * Unlock notarytool * Add AC_PASSWORD * store-creditials earlier * Add codesign debugs * gatekeeper-access: false, sign and notarize with electron forge * Test run platform specific config * Remove my-build/ * Test $KB_MAKE in artifact path * Check dmg signing * Check signing on wallet * Again * Fix env vars * again * Fix env var expansion * again * again * again * again * again * Add wallet entitlements.plist * Turn other platform builds back on * Mac zip only * zip only * cleanup * macos manual sign apps * comment * Remove ubuntu electron build * Test notarize KB * Test windows build * Build Windows KB * mac,linux,win zips mac,linux electron builds * Zip signed app * Test mac zip after sign * wallet cleanup * again * again * Fix env vars * No signing * Move output .zips into /make * Manual sign KB * Manual sign again * Again * No signing * Turn all builds back on * Add debug flag, take out windows electron build * Remove branch name from bitcoin-s-ts checkout
178 lines
8.6 KiB
YAML
178 lines
8.6 KiB
YAML
# Legacy JavaFX Desktop Application builds
|
|
name: JavaFX Desktop Apps
|
|
on:
|
|
push:
|
|
branches: [master, main]
|
|
tags: ["*"]
|
|
release:
|
|
types: [ published ]
|
|
|
|
env:
|
|
pkg-assembly: 'bitcoin-s-bundle.jar'
|
|
pkg-name: 'bitcoin-s'
|
|
|
|
jobs:
|
|
javafx-macos:
|
|
runs-on: [ macos-latest ]
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Setup Scala
|
|
uses: olafurpg/setup-scala@v13
|
|
with:
|
|
java-version: openjdk@1.17.0
|
|
- name: Get Previous tag
|
|
id: previoustag
|
|
uses: WyriHaximus/github-action-get-previous-tag@v1
|
|
with:
|
|
fallback: 0.0.0 # Optional fallback tag to use when no tag can be found
|
|
- name: Import developer cert to keychain
|
|
uses: apple-actions/import-codesign-certs@v1
|
|
with:
|
|
create-keychain: true
|
|
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
|
|
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
|
|
keychain-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
|
|
- name: Build fat jar
|
|
run: sbt "bundle/assembly"
|
|
- name: Add cert to keychain and unlock keychain & build and sign dmg
|
|
env:
|
|
pkg-version: ${{steps.previoustag.outputs.tag}}
|
|
MACOS_CERTIFICATE_PWD: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
|
|
MAC_NOTARIZATION_PW: ${{secrets.MAC_NOTARIZATION_PW}}
|
|
# Steps to build a fully signed and notarized bitcoin-s dmg
|
|
# 1. Unlock the OS x keychain so we don't have to input passwords via GUI prompts
|
|
# 2. Build bitcoin-s.app that is recursively signed with jpackage --mac-sign
|
|
# 3. Build an unsigned dmg that contains bitcoin-s.app inside of it (no idea why --mac-sign doesn't work with --type dmg)
|
|
# 4. Sign the dmg with codesign (jpackage dmg signing is broken for some reason)
|
|
# 5. Submit the dmg to apple's notarization service so can get it whitelisted for installation (see: https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution)
|
|
# 6. Sleep until apple notorization is done
|
|
# 7. Retrieve the signature and staple it to the dmg to so network requests do not need to be made to open the dmg
|
|
# 8. Check all signatures on bitcoin-s.app (see: https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087735)
|
|
# 9. Check all dmg signatures
|
|
# 10. Display information about signed dmg
|
|
run: |
|
|
echo "Hello world"
|
|
java -version
|
|
jpackage --version
|
|
ls -l
|
|
security unlock-keychain -p $MACOS_CERTIFICATE_PWD signing_temp.keychain
|
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $MACOS_CERTIFICATE_PWD signing_temp.keychain
|
|
echo "===========jpackage app image begin================"
|
|
jpackage --verbose --name ${{ env.pkg-name }} --app-version ${{steps.previoustag.outputs.tag}} --mac-package-name ${{ env.pkg-name }} --type app-image -i app/bundle/target/scala-2.13/ --main-class org.bitcoins.bundle.gui.BundleGUI --main-jar ${{ env.pkg-assembly }} --icon app/gui/src/main/resources/icons/bitcoin-s.icns --mac-sign --mac-signing-keychain /Users/runner/Library/Keychains/signing_temp.keychain-db --mac-signing-key-user-name "Chris Stewart (9ZG3GPKHX8)"
|
|
echo "===========jpackage dmg begin================"
|
|
jpackage --verbose --name ${{ env.pkg-name }} --app-version ${{steps.previoustag.outputs.tag}} --mac-package-name ${{ env.pkg-name }} --type dmg --app-image bitcoin-s.app --mac-sign --mac-signing-key-user-name "Chris Stewart (9ZG3GPKHX8)"
|
|
echo "Signing dmg with code sign"
|
|
codesign -s "Developer ID Application: Chris Stewart (9ZG3GPKHX8)" --options runtime -vvvv --deep ${{ env.pkg-name }}-${{steps.previoustag.outputs.tag}}.dmg
|
|
echo "Running xcrun alttool --notarize app"
|
|
REQUEST_UUID=$(xcrun altool --notarize-app --primary-bundle-id "org.bitcoins.bundle" -u "stewart.chris1234@gmail.com" --team-id "9ZG3GPKHX8" --password "$MAC_NOTARIZATION_PW" --file ${{ env.pkg-name }}-${{steps.previoustag.outputs.tag}}.dmg | grep RequestUUID | awk '{print $3}')
|
|
echo "Waiting for notarization from Apple for $REQUEST_UUID"
|
|
sleep 5
|
|
xcrun altool --notarization-info "$REQUEST_UUID" -u "stewart.chris1234@gmail.com" --team-id "9ZG3GPKHX8" -p "$MAC_NOTARIZATION_PW"
|
|
echo "Start while loop"
|
|
while xcrun altool --notarization-info "$REQUEST_UUID" -u "stewart.chris1234@gmail.com" --team-id "9ZG3GPKHX8" -p "$MAC_NOTARIZATION_PW" | grep "Status: in progress" > /dev/null; do
|
|
echo "Verification in progress..."
|
|
sleep 30
|
|
done
|
|
xcrun stapler staple ${{ env.pkg-name }}-${{steps.previoustag.outputs.tag}}.dmg
|
|
echo "Done stapling"
|
|
spctl -vvv --assess --type exec bitcoin-s.app
|
|
echo "Done inspecting app with spctl"
|
|
codesign -vvv --deep --strict ${{ env.pkg-name }}-${{steps.previoustag.outputs.tag}}.dmg
|
|
echo "Done verifying code signing deep"
|
|
codesign -dvv ${{ env.pkg-name }}-${{steps.previoustag.outputs.tag}}.dmg
|
|
echo "Done verifying artifacts"
|
|
ls -l
|
|
- name: Echo download path
|
|
run: echo ${{steps.download.outputs.download-path}}
|
|
- name: Upload mac-javafx dmg
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: mac-javafx
|
|
path: ${{ env.pkg-name }}-${{steps.previoustag.outputs.tag}}.dmg
|
|
- name: Upload if release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
name: mac-javafx
|
|
files: ${{ env.pkg-name }}-${{steps.previoustag.outputs.tag}}.dmg
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
javafx-linux:
|
|
runs-on: [ ubuntu-latest ]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Setup Scala
|
|
uses: olafurpg/setup-scala@v13
|
|
with:
|
|
java-version: openjdk@1.17.0
|
|
- name: Get Previous tag
|
|
id: previoustag
|
|
uses: WyriHaximus/github-action-get-previous-tag@v1
|
|
with:
|
|
fallback: 1.0.0 # Optional fallback tag to use when no tag can be found
|
|
- name: Build fat jar
|
|
run: sbt "bundle/assembly"
|
|
- name: Package jar as debian package
|
|
env:
|
|
pkg-version: ${{steps.previoustag.outputs.tag}}
|
|
run: "jpackage --linux-shortcut --name ${{ env.pkg-name }} --app-version ${{steps.previoustag.outputs.tag}} --type deb -i app/bundle/target/scala-2.13/ --main-class org.bitcoins.bundle.gui.BundleGUI --main-jar ${{ env.pkg-assembly }} --icon app/gui/src/main/resources/icons/bitcoin-s.png"
|
|
- name: View Artifacts
|
|
run: ls -l
|
|
- name: Print working dir
|
|
run: pwd
|
|
- name: Upload linux-javafx deb
|
|
uses: actions/upload-artifact@v3
|
|
env:
|
|
pkg-version: ${{steps.previoustag.outputs.tag}}
|
|
with:
|
|
name: linux-javafx
|
|
path: ${{ env.pkg-name }}_${{ steps.previoustag.outputs.tag }}-1_amd64.deb
|
|
- name: Upload if release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
name: linux-javafx
|
|
files: ${{ env.pkg-name }}_${{ steps.previoustag.outputs.tag }}-1_amd64.deb
|
|
env:
|
|
pkg-version: ${{steps.previoustag.outputs.tag}}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
javafx-windows:
|
|
runs-on: [windows-latest]
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Setup Scala
|
|
uses: olafurpg/setup-scala@v13
|
|
with:
|
|
java-version: openjdk@1.17.0
|
|
- name: Get Previous tag
|
|
id: previoustag
|
|
uses: WyriHaximus/github-action-get-previous-tag@v1
|
|
with:
|
|
fallback: 1.0.0 # Optional fallback tag to use when no tag can be found
|
|
- name: Build msi
|
|
shell: bash
|
|
run: sbt bundle/windows:packageBin
|
|
- name: View artifacts
|
|
run: ls -R .
|
|
- name: Upload windows-javafx msi
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: windows-javafx
|
|
path: "D:\\a\\bitcoin-s\\bitcoin-s\\app\\bundle\\target\\windows\\bitcoin-s-bundle.msi"
|
|
- name: Upload if release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
name: windows-javafx
|
|
files: "D:\\a\\bitcoin-s\\bitcoin-s\\app\\bundle\\target\\windows\\bitcoin-s-bundle.msi"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|