diff --git a/.github/workflows/release-assets.yml b/.github/workflows/release-assets.yml new file mode 100644 index 00000000..47c0a615 --- /dev/null +++ b/.github/workflows/release-assets.yml @@ -0,0 +1,50 @@ +name: Build and Package Web Assets + +on: + workflow_dispatch: + inputs: + release_tag: + description: 'Release tag to upload the zip to (e.g. v1.0.0)' + required: true + +jobs: + build-and-package: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Set up Node.js (Latest LTS) + uses: actions/setup-node@v6 + with: + node-version: 'lts/*' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run unit tests + run: npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI + + - name: Build Angular app + run: npm run build + + - name: Zip built assets + run: | + cd dist/agent_framework_web/browser + zip -r ../../../adk-web-browser.zip . + + - name: Upload Release Asset (Production Build) + run: | + if gh release view ${{ github.event.inputs.release_tag }} >/dev/null 2>&1; then + echo "Release exists. Uploading asset..." + gh release upload ${{ github.event.inputs.release_tag }} adk-web-browser.zip --clobber + else + echo "Release does not exist. Creating release and uploading asset..." + gh release create ${{ github.event.inputs.release_tag }} adk-web-browser.zip --title "${{ github.event.inputs.release_tag }}" --notes "Manual release built from adk-web@${{ github.sha }}" + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/src/assets/config/runtime-config.json b/src/assets/config/runtime-config.json index c6732406..c8f49d88 100644 --- a/src/assets/config/runtime-config.json +++ b/src/assets/config/runtime-config.json @@ -1,3 +1,3 @@ { - "backendUrl": "http://localhost:8000" + "backendUrl": "" } \ No newline at end of file diff --git a/src/index.html b/src/index.html index 3f872662..4793843e 100644 --- a/src/index.html +++ b/src/index.html @@ -1,6 +1,6 @@