From 0f96e7390f5bb7be180720bde7b02fa840db01d1 Mon Sep 17 00:00:00 2001 From: Will Date: Wed, 18 Oct 2023 23:07:29 -0500 Subject: [PATCH] release cicd! --- .github/workflows/testcompile.yml | 48 +++++++++++++++++-------- .gitignore | 3 +- DesktopApp/innosetup.iss | 58 +++++++++++++++++++++++++++++++ README.md | 3 ++ 4 files changed, 97 insertions(+), 15 deletions(-) create mode 100644 DesktopApp/innosetup.iss diff --git a/.github/workflows/testcompile.yml b/.github/workflows/testcompile.yml index 599c7d2..4b1c043 100644 --- a/.github/workflows/testcompile.yml +++ b/.github/workflows/testcompile.yml @@ -27,18 +27,10 @@ jobs: run: | .venv\Scripts\python .\DesktopApp\compile.py - - name: Prepare release files - run: | - mkdir release_artifacts - xcopy "DesktopApp\dist\Boxman Fiddlejig" "release_artifacts\Boxman Fiddlejig" /E /Y /I - - - - name: Set up release version run: echo "RELEASE_VERSION=v$(date +'%Y%m%d')" >> $GITHUB_ENV shell: bash - - name: Create tag run: | git config user.name "GitHub Actions" @@ -46,20 +38,48 @@ jobs: git tag ${{ env.RELEASE_VERSION }} git push --tags - - name: Archive release files - run: Compress-Archive -Path "release_artifacts/Boxman Fiddlejig/*" -DestinationPath "release_artifacts/BoxmanFiddlejig.zip" + + # Prepare an installer release + - name: Setup Inno Setup + uses: crazy-max/ghaction-inno-setup@v3 + + - name: Compile Inno Setup Script + run: | + ISCC.exe ./DesktopApp/innosetup.iss + + - name: Archive installer files + run: | + Compress-Archive -Path "DesktopApp/Output/setup.exe" -DestinationPath "release_artifacts/BoxmanFiddlejigInstaller.zip" shell: pwsh + - name: Create and Upload Release uses: softprops/action-gh-release@v1 with: name: Release ${{ env.RELEASE_VERSION }} tag_name: $RELEASE_VERSION - body: "Do not run this yet." + body: "Installer for Boxman Fiddlejig." token: ${{ secrets.RELEASE_TOKEN }} - files: release_artifacts/BoxmanFiddlejig.zip - # release_artifacts/Boxman Fiddlejig/* - # release_artifacts/Boxman Fiddlejig/giblets/* + files: release_artifacts/BoxmanFiddlejigInstaller.zip + + # # prepare a direct release + # - name: Prepare release files + # run: | + # mkdir release_artifacts + # xcopy "DesktopApp\dist\Boxman Fiddlejig" "release_artifacts\Boxman Fiddlejig" /E /Y /I + + # - name: Archive release files + # run: Compress-Archive -Path "release_artifacts/Boxman Fiddlejig/*" -DestinationPath "release_artifacts/BoxmanFiddlejig.zip" + # shell: pwsh + + # - name: Create and Upload Release + # uses: softprops/action-gh-release@v1 + # with: + # name: Release ${{ env.RELEASE_VERSION }} + # tag_name: $RELEASE_VERSION + # body: "Do not run this yet." + # token: ${{ secrets.RELEASE_TOKEN }} + # files: release_artifacts/BoxmanFiddlejig.zip diff --git a/.gitignore b/.gitignore index 92aedde..9ae46e0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ __pycache__/* settings.json *.spec __pycache__/ -/release_artifacts \ No newline at end of file +/release_artifacts +DesktopApp/Output/* diff --git a/DesktopApp/innosetup.iss b/DesktopApp/innosetup.iss new file mode 100644 index 0000000..52a32d6 --- /dev/null +++ b/DesktopApp/innosetup.iss @@ -0,0 +1,58 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +#define MyAppName "Boxman Fiddlejig" +#define MyAppVersion "1.0.0" +#define MyAppPublisher "William Box" +#define MyAppURL "https://github.com/Boxylmer/ESPLiveBackLight/" +#define MyAppExeName "Boxman Fiddlejig.exe" +#define SourceDir "dist\Boxman Fiddlejig" + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) +AppId={{4FFE5A7B-CB38-4286-8088-2C18A8784A27} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +;AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={autopf}\{#MyAppName} +DisableDirPage=yes +DisableProgramGroupPage=yes +; Remove the following line to run in administrative install mode (install for all users.) +PrivilegesRequired=lowest +PrivilegesRequiredOverridesAllowed=dialog +OutputBaseFilename=setup +; SetupIconFile=C:\git\ESPLiveBackLight\DesktopApp\dist\Boxman Fiddlejig\giblets\Application\resources\think.ico +SetupIconFile="{#SourceDir}\giblets\Application\resources\think.ico" +Compression=lzma +SolidCompression=yes +WizardStyle=modern + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked +Name: "startup"; Description: "Launch {#MyAppName} at system startup"; GroupDescription: "{cm:AdditionalIcons}"; + +[UninstallDelete] +Type: files; Name: "{userstartup}\{#MyAppName}.lnk" + +[Files] +Source: "{#SourceDir}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#SourceDir}\giblets\*"; DestDir: "{app}\giblets"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#SourceDir}\giblets\python38.dll"; DestDir: "{app}"; Flags: ignoreversion +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Icons] +Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" +Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon +Name: "{userstartup}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: startup + +[Run] +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent + diff --git a/README.md b/README.md index 8df5473..e8016da 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ This is a work in progress that uses - the ESP8266 Microcontroller (using the very well written FastLED library) - the WS2812B led chip - 3D printing through FreeCAD +- Circuit board design through KiCAD + +And for potential employers looking at this, look at all this cool CI/CD stuff! To provide a fast, fully customizable backlight that updates with the colors on the borders of your screen.