Skip to content

Add the ability to generate SSL certs from tray icon #778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Apr 21, 2023
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c611395
move `config.go` to it's own package and make functions public.
umbynos Mar 23, 2023
a5bfc94
move `config.ini` in the right package and remove hack
umbynos Mar 30, 2023
2ce9a06
fix linter
umbynos Mar 30, 2023
ac361f7
move `CrashesIsEmpty` function to the config package and rename it
umbynos Mar 23, 2023
02eacd1
move `certificate.go` in it's own package and make functions public
umbynos Mar 23, 2023
14dfc2b
update license header
umbynos Mar 31, 2023
f7d9772
add menu option to generate the certs only if they are not present
umbynos Mar 28, 2023
1971f9e
systray is useless in this func
umbynos Mar 28, 2023
e83c557
add cert install on macos
umbynos Mar 30, 2023
bcaeb75
add cert install on win
umbynos Apr 7, 2023
7f436f2
fix certificate not being valid for 127.0.0.1
umbynos Apr 6, 2023
3a5cb38
disable the generation/install certs menuItem on OS that are not macos
umbynos Apr 12, 2023
b62a2ff
remove the cert generation from the installer, remove duplicate step
umbynos Apr 14, 2023
2b41a4d
parallelization for notarization is no more required
umbynos Apr 14, 2023
d27ddb0
test new version of the installer config
umbynos Apr 14, 2023
3e7fead
move archive generation in the CI and save a rename operation (we do …
umbynos Apr 17, 2023
0b35ff4
removed `-` in arch matrix variable for clarity
umbynos Apr 17, 2023
b6f6947
Revert "add cert install on win"
umbynos Apr 19, 2023
8007107
add popup on error
umbynos Apr 20, 2023
4dde91e
Fixed warnings in obj-c code
cmaglie Apr 20, 2023
85a7b00
remove the certs if the install process errors. The user is able to r…
umbynos Apr 21, 2023
bda1574
Revert "test new version of the installer config"
umbynos Apr 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removed - in arch matrix variable for clarity
  • Loading branch information
umbynos committed Apr 21, 2023
commit 0b35ff42300a84c4a0a510e6e289fc732ebda064
42 changes: 21 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-12]
arch: [-amd64]
arch: [amd64]
include:
- os: windows-2019
arch: -386
arch: 386
ext: ".exe"
- os: windows-2019
ext: ".exe"
Expand Down Expand Up @@ -104,11 +104,11 @@ jobs:
env:
GOARCH: 386 # 32bit architecture (for support)
run: task go:build-win
if: matrix.os == 'windows-2019' && matrix.arch == '-386'
if: matrix.os == 'windows-2019' && matrix.arch == '386'

- name: Build the Agent for win64
run: task go:build-win # GOARCH=amd64 by default on the runners
if: matrix.os == 'windows-2019' && matrix.arch == '-amd64'
if: matrix.os == 'windows-2019' && matrix.arch == 'amd64'

- name: Build the Agent for macos
env:
Expand All @@ -121,7 +121,7 @@ jobs:
# this will create `public/` dir with compressed full bin (<version>/<os>-<arch>.gz) and a json file
- name: Create autoupdate files
run: go-selfupdate ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
if: matrix.arch != '-386' && steps.prerelease.outputs.IS_PRE != 'true'
if: matrix.arch != '386' && steps.prerelease.outputs.IS_PRE != 'true'

# for now we do not distribute m1 build, this is a workaround for now
- name: Copy autoupdate file for darwin-arm64 (m1 arch)
Expand All @@ -132,8 +132,8 @@ jobs:
if: matrix.os == 'macos-12' && steps.prerelease.outputs.IS_PRE != 'true'

- name: Create autoupdate files for win32
run: go-selfupdate -platform windows${{ matrix.arch }} ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
if: matrix.arch == '-386' && matrix.os == 'windows-2019' && steps.prerelease.outputs.IS_PRE != 'true'
run: go-selfupdate -platform windows-${{ matrix.arch }} ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
if: matrix.arch == '386' && matrix.os == 'windows-2019' && steps.prerelease.outputs.IS_PRE != 'true'

- name: Upload autoupdate files to Arduino downloads servers
run: |
Expand All @@ -144,7 +144,7 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.PROJECT_NAME }}-${{ matrix.os }}${{ matrix.arch }}
name: ${{ env.PROJECT_NAME }}-${{ matrix.os }}-${{ matrix.arch }}
path: |
${{ env.PROJECT_NAME }}*
if-no-files-found: error
Expand Down Expand Up @@ -345,15 +345,15 @@ jobs:
fail-fast: false # if one os is failing continue nonetheless
matrix: # used to generate installers for different OS and not for runs-on
os: [ubuntu-20.04, windows-2019, macos-12]
arch: [-amd64]
arch: [amd64]
include:
- os: ubuntu-20.04
install-builder-name: linux
executable-path: artifacts/linux-amd64/
installer-extension: .run
artifact-name: arduino-create-agent-ubuntu-20.04-amd64
- os: windows-2019
arch: -386
arch: 386
install-builder-name: windows
executable-path: artifacts/windows/
extension: .exe
Expand Down Expand Up @@ -424,16 +424,16 @@ jobs:
# installbuilder reads the env vars with certs paths and use it to sign the installer.
- name: Launch Bitrock installbuilder
run: |
${{ env.INSTALLBUILDER_PATH }} build installer.xml ${{ matrix.install-builder-name }} --verbose --license /tmp/license.xml --setvars "${{ env.INSTALLER_VARS }} architecture=${{ matrix.arch }}"
${{ env.INSTALLBUILDER_PATH }} build installer.xml ${{ matrix.install-builder-name }} --verbose --license /tmp/license.xml --setvars ${{ env.INSTALLER_VARS }} architecture=${{ matrix.arch }}

- name: Generate archive
run: tar -czvf ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer.tar.gz ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer${{matrix.installer-extension}}
run: tar -czvf ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}-${{ matrix.arch }}-installer.tar.gz ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.install-builder-name }}-${{ matrix.arch }}-installer${{matrix.installer-extension}}
if: matrix.os == 'ubuntu-20.04'

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ArduinoCreateAgent-${{ matrix.install-builder-name }}${{ matrix.arch }}
name: ArduinoCreateAgent-${{ matrix.install-builder-name }}-${{ matrix.arch }}
path: ArduinoCreateAgent*
if-no-files-found: error

Expand All @@ -442,19 +442,19 @@ jobs:
needs: package
strategy:
matrix:
arch: [-amd64]
arch: [amd64]

runs-on: macos-12
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ArduinoCreateAgent-osx${{ matrix.arch }}
name: ArduinoCreateAgent-osx-${{ matrix.arch }}
path: ArduinoCreateAgent-osx

# zip artifacts do not mantain executable permission
- name: Make executable
run: chmod -v +x ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx${{ matrix.arch }}-installer.app/Contents/MacOS/*
run: chmod -v +x ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.app/Contents/MacOS/*

- name: Import Code-Signing Certificates
run: |
Expand Down Expand Up @@ -484,33 +484,33 @@ jobs:
# gon does not allow env variables in config file (https://github.com/mitchellh/gon/issues/20)
run: |
cat > gon.config_installer.hcl <<EOF
source = ["ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx${{ matrix.arch }}-installer.app"]
source = ["ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.app"]
bundle_id = "cc.arduino.${{ env.PROJECT_NAME }}-installer"

sign {
application_identity = "Developer ID Application: ARDUINO SA (7KT7ZWMCJT)"
}

dmg {
output_path = "ArduinoCreateAgent-${GITHUB_REF##*/}-osx${{ matrix.arch }}-installer.dmg"
output_path = "ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg"
volume_name = "ArduinoCreateAgent"
}
EOF

- name: Code sign and notarize app
run: |
echo "gon will notarize executable in ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx${{ matrix.arch }}-installer.app"
echo "gon will notarize executable in ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.app"
gon -log-level=debug -log-json gon.config_installer.hcl
timeout-minutes: 30

# tar dmg file to keep executable permission
- name: Tar files to keep permissions
run: tar -cvf ArduinoCreateAgent-${GITHUB_REF##*/}-osx${{ matrix.arch }}-installer.tar ArduinoCreateAgent-${GITHUB_REF##*/}-osx${{ matrix.arch }}-installer.dmg
run: tar -cvf ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.tar ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ArduinoCreateAgent-osx${{ matrix.arch }}
name: ArduinoCreateAgent-osx-${{ matrix.arch }}
path: ArduinoCreateAgent*.tar
if-no-files-found: error

Expand Down