Skip to content

Commit

Permalink
remove the cert generation from the installer, remove duplicate step
Browse files Browse the repository at this point in the history
  • Loading branch information
umbynos committed Apr 21, 2023
1 parent 3a5cb38 commit b62a2ff
Showing 1 changed file with 4 additions and 25 deletions.
29 changes: 4 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,6 @@ jobs:
INSTALLBUILDER_PATH: "/opt/installbuilder-22.10.0/bin/builder"
INSTALLER_VARS: "project.outputDirectory=$PWD project.version=${GITHUB_REF##*/} workspace=$PWD realname=Arduino_Create_Agent"
# vars passed to installbuilder to install https certs automatically
CERT_INSTALL: "ask_certificates_install=CI" # win(edge),mac(safari)
NO_CERT_INSTALL: "ask_certificates_install=CS" # linux
CHOICE_CERT_INSTALL: "ask_certificates_install=CC" # win,mac:(ff,chrome)
CREATE_OSX_BUNDLED_MG: 0 # tell installbuilder to not create the DMG, gon will take care of that later
# installbuilder will read this vars automatically (defined in installer.xml):
INSTALLER_CERT_WINDOWS_PASSWORD: ${{ secrets.INSTALLER_CERT_WINDOWS_PASSWORD }}
Expand All @@ -353,24 +350,22 @@ jobs:
- os: ubuntu-20.04
install-builder-name: linux
executable-path: artifacts/linux-amd64/
installer-extension: .tar.gz
artifact-name: arduino-create-agent-ubuntu-20.04-amd64
- os: windows-2019
arch: -386
browser: edge
install-builder-name: windows
executable-path: artifacts/windows/
extension: .exe
installer-extension: .exe
artifact-name: arduino-create-agent-windows-2019-386
- os: windows-2019
browser: edge
install-builder-name: windows
executable-path: artifacts/windows/
extension: .exe
installer-extension: .exe
artifact-name: arduino-create-agent-windows-2019-amd64
- os: macos-12
browser: safari
install-builder-name: osx
executable-path: artifacts/macos/ArduinoCreateAgent.app
installer-extension: .app
Expand Down Expand Up @@ -425,27 +420,11 @@ jobs:
run: echo "${{ secrets.INSTALLER_CERT_MAC_P12 }}" | base64 --decode > ${{ env.INSTALLER_CERT_MAC_P12 }}
if: matrix.os == 'macos-12'

# win(edge),mac(safari) -> CERT_INSTALL and win,mac:(ff,chrome) -> CHOICE_CERT_INSTALL
# installbuilder reads the env vars with certs paths and use it to sign the installer.
- name: Launch Bitrock installbuilder-20 with CERT_INSTALL && CHOICE_CERT_INSTALL
- name: Launch Bitrock installbuilder
run: |
${{ env.INSTALLBUILDER_PATH }} build installer.xml ${{ matrix.install-builder-name }} --verbose --license /tmp/license.xml --setvars ${{ env.INSTALLER_VARS }} ${{ env.CERT_INSTALL }}
mv -v ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}-installer-CI${{matrix.installer-extension}} ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-${{matrix.browser}}${{matrix.installer-extension}}
${{ env.INSTALLBUILDER_PATH }} build installer.xml ${{ matrix.install-builder-name }} --verbose --license /tmp/license.xml --setvars ${{ env.INSTALLER_VARS }} ${{ env.CHOICE_CERT_INSTALL }}
cp -vr ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}-installer-CC${{matrix.installer-extension}} ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-chrome${{matrix.installer-extension}}
mv -v ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}-installer-CC${{matrix.installer-extension}} ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-firefox${{matrix.installer-extension}}
rm -r ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}-installer-C*
if: matrix.os == 'windows-2019' || matrix.os == 'macos-12'

# linux
- name: Launch Bitrock installbuilder-20 with NO_CERT_INSTALL
run: |
${{ env.INSTALLBUILDER_PATH }} build installer.xml linux-x64 --verbose --license /tmp/license.xml --setvars ${{ env.INSTALLER_VARS }} ${{ env.NO_CERT_INSTALL }}
cp -v ArduinoCreateAgent-${GITHUB_REF##*/}-linux-x64-installer-CS.run ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-chrome.run
mv -v ArduinoCreateAgent-${GITHUB_REF##*/}-linux-x64-installer-CS.run ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-firefox.run
cp -v ArduinoCreateAgent-${GITHUB_REF##*/}-linux-x64-installer-CS.tar.gz ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-chrome.tar.gz
mv -v ArduinoCreateAgent-${GITHUB_REF##*/}-linux-x64-installer-CS.tar.gz ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-firefox.tar.gz
if: matrix.os == 'ubuntu-20.04'
${{ env.INSTALLBUILDER_PATH }} build installer.xml ${{ matrix.install-builder-name }} --verbose --license /tmp/license.xml --setvars ${{ env.INSTALLER_VARS }}
mv -v ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}-installer${{matrix.installer-extension}} ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer${{matrix.installer-extension}}
- name: Upload artifacts
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit b62a2ff

Please sign in to comment.