diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml new file mode 100644 index 00000000..c67131fc --- /dev/null +++ b/.github/workflows/installer.yml @@ -0,0 +1,45 @@ +name: CLI Installer + +on: + release: + types: + - published + +jobs: + build-and-push: + if: github.ref_type == 'tag' + name: Build & Upload + runs-on: windows-latest + permissions: + contents: write + packages: write + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Authenticate Github CLI + run: | + Write-Output $Env:GITHUB_TOKEN | gh auth login --with-token + + - name: Download cli-windows-x86_64.exe from this release + run: | + gh release download "${{ github.event.release.tag_name }}" \ + --pattern cli-windows-x86_64.exe \ + --dir . + + - name: Copy ICO into workspace root + run: | + Copy-Item -Path images\*.ico -Destination $Env:GITHUB_WORKSPACE + + - name: Install Inno Setup + run: choco install innosetup -y + + - name: Build Windows Installer + run: | + iscc cli\setup.iss /Ooutput + + - name: Upload Windows Installer to Release + uses: softprops/action-gh-release@v2 + with: + cli-windows-x86_64-setup.exe \ No newline at end of file diff --git a/cli/setup.iss b/cli/setup.iss new file mode 100644 index 00000000..640b77e8 --- /dev/null +++ b/cli/setup.iss @@ -0,0 +1,29 @@ +[Setup] +; Basic application information +AppName=Atomic Cloud CLI +AppVersion=0.0.0-nightly +DefaultDirName={\pf32}\Atomic Cloud +DefaultGroupName=Atomic Cloud +OutputBaseFilename=cli-windows-x86_64-setup +Compression=lzma2 +overwriteinstallations=yes + +SetupIconFile=logo.ico + +[Languages] +Name: "english"; MessagesFile: "compiler\:Default.isl" + +[Files] +Source: "cli-windows-x86\_64.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "logo.ico"; DestDir: "{app}"; Flags: ignoreversion + +[Icons] +; Desktop shortcut +Name: "{userdesktop}\Atomic Cloud CLI"; Filename: "{app}\cli-windows-x86\_64.exe"; WorkingDir: "{app}"; IconFilename: "{app}\logo.ico" + +; Start Menu shortcut +Name: "{group}\Atomic Cloud CLI"; Filename: "{app}\cli-windows-x86\_64.exe"; WorkingDir: "{app}"; IconFilename: "{app}\logo.ico" + +[Run] +; Optionally launch the application after installation +Filename: "{app}\cli-windows-x86\_64.exe"; Description: "Launch Atomic Cloud CLI"; Flags: nowait postinstall skipifsilent diff --git a/images/logo.ico b/images/logo.ico new file mode 100644 index 00000000..2f607fde Binary files /dev/null and b/images/logo.ico differ diff --git a/logo.svg b/images/logo.svg similarity index 100% rename from logo.svg rename to images/logo.svg