diff --git a/.github/workflows/ci-cd-releases.yml b/.github/workflows/ci-cd-releases.yml index ba3c2b46..2b80a327 100644 --- a/.github/workflows/ci-cd-releases.yml +++ b/.github/workflows/ci-cd-releases.yml @@ -33,8 +33,8 @@ jobs: - name: 'Create and push the artifact' uses: actions/upload-artifact@v4 with: - name: frontend-build - path: ./frontend + name: frontend-artifact + path: ./frontend/dist build_dotnet_app_release_backend_job: runs-on: ubuntu-latest @@ -56,8 +56,8 @@ jobs: - name: 'Create and push the artifact' uses: actions/upload-artifact@v4 with: - name: backend-build - path: ./backend + name: backend-artifact + path: ./backend/ParkNDeploy.Api/publish deploy_infrastructure: runs-on: ubuntu-latest @@ -109,8 +109,8 @@ jobs: - name: Download a single artifact uses: actions/download-artifact@v5 with: - name: frontend-build - path: ./frontend + name: frontend-artifact + path: ./frontend/dist - name: Login to Azure uses: azure/login@v2 @@ -129,7 +129,7 @@ jobs: uses: azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ env.SWA_DEPLOYMENT_TOKEN }} - app_location: ./frontend + app_location: frontend/dist action: upload skip_app_build: true skip_api_build: true @@ -146,8 +146,8 @@ jobs: - name: Download a single artifact uses: actions/download-artifact@v5 with: - name: backend-build - path: ./backend + name: backend-artifact + path: ./backend/ParkNDeploy.Api/publish - name: Login to Azure uses: azure/login@v2 @@ -160,4 +160,4 @@ jobs: uses: azure/webapps-deploy@v2 with: app-name: ${{ needs.deploy_infrastructure.outputs.appServiceName }} # Access to the previous job output to get the appServiceName deployed with bicep - package: ./backend \ No newline at end of file + package: ./backend/ParkNDeploy.Api/publish # Path to the previously published app \ No newline at end of file diff --git a/frontend/package-lock.json b/frontend/package-lock.json index f4a4f550..205ae800 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "frontend", - "version": "0.0.0", + "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "frontend", - "version": "0.0.0", + "version": "0.0.1", "dependencies": { "@radix-ui/react-icons": "^1.3.2", "@tanstack/react-query": "^5.84.1", diff --git a/frontend/package.json b/frontend/package.json index a0946957..e45e81f5 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "frontend", "private": true, - "version": "0.0.0", + "version": "0.0.1", "type": "module", "scripts": { "dev": "vite --port 5175", diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 986ff9bb..34e9ae73 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -31,6 +31,7 @@ function App() { {isPending && } {isError && Something went wrong with the backend ...} {data && } +

App Version: {APP_VERSION}

); } diff --git a/frontend/src/vite-env.d.ts b/frontend/src/vite-env.d.ts index 11f02fe2..28929cce 100644 --- a/frontend/src/vite-env.d.ts +++ b/frontend/src/vite-env.d.ts @@ -1 +1,2 @@ /// +declare const APP_VERSION: string; \ No newline at end of file diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index ed788acb..b1a66785 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -20,4 +20,7 @@ export default defineConfig({ }, }, plugins: [react()], + define: { + APP_VERSION: JSON.stringify(process.env.npm_package_version), + }, })