Repository navigation
Feat: harden auto-update pipeline, secure API contracts & tune CI/CD #15
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
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
900e4b2
Feat: Implement application versioning architecture as a single sourc…
MathCunha16 52a81a5
Feat: Add update management architecture with download, installation,…
MathCunha16 815b2b8
Feat: Implement current version retrieval API with use case, controll…
MathCunha16 79ad422
feat frontend: implement auto-updater integration with release versio…
MathCunha16 41dace7
feat: implement CI/CD pipelines for automated testing and cross-platf…
MathCunha16 bdd9083
refactor: centralize temp folder resolution logic and unify access in…
MathCunha16 c9b6424
refactor: enhance version comparison logic and extend test coverage
MathCunha16 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| changelog: | ||
| categories: | ||
| - title: "Features" | ||
| labels: | ||
| - "feature" | ||
| - "enhancement" | ||
| - title: "Bug Fixes" | ||
| labels: | ||
| - "fix" | ||
| - "bug" | ||
| - title: "Performance Improvements" | ||
| labels: | ||
| - "performance" | ||
| - "perf" | ||
| - title: "Documentation" | ||
| labels: | ||
| - "documentation" | ||
| - "docs" | ||
| - title: "Maintenance & Infrastructure" | ||
| labels: | ||
| - "chore" | ||
| - "ci" | ||
| - "dependencies" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: CI Backend Test Suite | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| types: | ||
| - opened | ||
| - synchronize | ||
| - reopened | ||
| - ready_for_review | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Run Backend Test Suite | ||
| if: github.event.pull_request.draft == false | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Node.js 20 | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| cache-dependency-path: 'frontend/package-lock.json' | ||
|
|
||
| - name: Install Frontend Dependencies | ||
| working-directory: ./frontend | ||
| run: npm ci | ||
|
|
||
| - name: Setup Java 21 (Temurin) | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '21' | ||
|
|
||
| - name: Setup Gradle | ||
| uses: actions/setup-gradle@v6 | ||
|
|
||
| - name: Run Backend Tests | ||
| working-directory: ./backend | ||
| run: | | ||
| chmod +x gradlew | ||
| ./gradlew test --no-daemon | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,246 @@ | ||
| name: Release CI/CD Pipeline | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
| workflow_dispatch: | ||
|
MathCunha16 marked this conversation as resolved.
|
||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: release-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| # =========================================== | ||
| # STAGE 0: Tests & Version Sanity Check | ||
| # =========================================== | ||
| verify: | ||
| name: Run Tests & Verify Version | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Node.js 20 | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| cache-dependency-path: 'frontend/package-lock.json' | ||
|
|
||
| - name: Install Frontend Dependencies | ||
| working-directory: ./frontend | ||
| run: npm ci | ||
|
|
||
| - name: Setup Java 21 (Temurin) | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '21' | ||
|
|
||
| - name: Setup Gradle | ||
| uses: actions/setup-gradle@v6 | ||
|
|
||
| - name: Run Backend Tests | ||
| working-directory: ./backend | ||
| run: | | ||
| chmod +x gradlew | ||
| ./gradlew test --no-daemon | ||
|
|
||
| - name: Verify Tag Matches Gradle Version | ||
| if: github.event_name == 'push' | ||
| working-directory: ./backend | ||
| run: | | ||
| TAG_VERSION="${GITHUB_REF_NAME#v}" | ||
| GRADLE_VERSION=$(./gradlew properties -q | grep "^version:" | awk '{print $2}') | ||
| if [ "$TAG_VERSION" != "$GRADLE_VERSION" ]; then | ||
| echo "Tag version ($TAG_VERSION) does not match Gradle version ($GRADLE_VERSION)" | ||
| exit 1 | ||
| fi | ||
| echo "Tag version matches Gradle version: $TAG_VERSION" | ||
|
|
||
| # =========================================== | ||
| # STAGE 1: Linux Packaging | ||
| # =========================================== | ||
| build-linux: | ||
| name: Package Linux Installers (.deb, .rpm) | ||
| needs: verify | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Node.js 20 | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| cache-dependency-path: 'frontend/package-lock.json' | ||
|
|
||
| - name: Install Frontend Dependencies | ||
| working-directory: ./frontend | ||
| run: npm ci | ||
|
|
||
| - name: Setup Java 21 (Temurin) | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '21' | ||
|
|
||
| - name: Setup Gradle | ||
| uses: actions/setup-gradle@v6 | ||
|
|
||
| - name: Install Linux Package Utilities (rpm, dpkg-dev) | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y rpm dpkg-dev | ||
|
|
||
| - name: Build Linux Package Installers (.deb, .rpm) | ||
| working-directory: ./backend | ||
| run: | | ||
| chmod +x gradlew | ||
| ./gradlew packageDeb packageRpm --no-daemon | ||
|
|
||
| - name: Upload Linux Installer Artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: linux-installers | ||
| path: | | ||
| backend/build/jpackage/deb/*.deb | ||
| backend/build/jpackage/rpm/*.rpm | ||
| if-no-files-found: error | ||
|
|
||
| # =========================================== | ||
| # STAGE 2: Windows Packaging | ||
| # =========================================== | ||
| build-windows: | ||
| name: Package Windows Installer (.msi) | ||
| needs: verify | ||
| runs-on: windows-latest | ||
|
|
||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Node.js 20 | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| cache-dependency-path: 'frontend/package-lock.json' | ||
|
|
||
| - name: Install Frontend Dependencies | ||
| working-directory: ./frontend | ||
| run: npm ci | ||
|
|
||
| - name: Setup Java 21 (Temurin) | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '21' | ||
|
|
||
| - name: Setup Gradle | ||
| uses: actions/setup-gradle@v6 | ||
|
|
||
| - name: Install Wix Toolset 3.x (Chocolatey) | ||
| run: choco install wix --version 3.11.2 -y | ||
|
|
||
| - name: Build Windows Package Installer (.msi) | ||
| working-directory: ./backend | ||
| run: .\gradlew.bat packageMsi --no-daemon | ||
|
|
||
| - name: Upload Windows Installer Artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: windows-installer | ||
| path: backend/build/jpackage/msi/*.msi | ||
| if-no-files-found: error | ||
|
|
||
| # =========================================== | ||
| # STAGE 3: macOS Packaging | ||
| # =========================================== | ||
| build-macos: | ||
| name: Package macOS Installer (.dmg) | ||
| needs: verify | ||
| runs-on: macos-latest | ||
|
|
||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Node.js 20 | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| cache-dependency-path: 'frontend/package-lock.json' | ||
|
|
||
| - name: Install Frontend Dependencies | ||
| working-directory: ./frontend | ||
| run: npm ci | ||
|
|
||
| - name: Setup Java 21 (Temurin) | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '21' | ||
|
|
||
| - name: Setup Gradle | ||
| uses: actions/setup-gradle@v6 | ||
|
|
||
| - name: Build macOS Package Installer (.dmg) | ||
| working-directory: ./backend | ||
| run: | | ||
| chmod +x gradlew | ||
| ./gradlew packageDmg --no-daemon | ||
|
|
||
| - name: Upload macOS Installer Artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: macos-installer | ||
| path: backend/build/jpackage/dmg/*.dmg | ||
| if-no-files-found: error | ||
|
|
||
| # =========================================== | ||
| # STAGE 4: Publish on GitHub Releases | ||
| # =========================================== | ||
| publish-release: | ||
| name: Publish GitHub Release Assets | ||
| needs: | ||
| - build-linux | ||
| - build-windows | ||
| - build-macos | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
|
|
||
| steps: | ||
| - name: Download All Build Artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: release-assets | ||
| merge-multiple: true | ||
|
|
||
| - name: Display Collected Release Assets | ||
| run: | | ||
| echo "=== Executables Collected for Release ===" | ||
| ls -la release-assets/ | ||
|
|
||
| - name: Publish GitHub Release (softprops/action-gh-release) | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: | | ||
| release-assets/*.deb | ||
| release-assets/*.rpm | ||
| release-assets/*.msi | ||
| release-assets/*.dmg | ||
| generate_release_notes: true | ||
| draft: false | ||
| prerelease: false | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.