Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 34 additions & 32 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2025 Google LLC
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -15,38 +15,40 @@
name: Release

on:
release:
types: [published]
pull_request:
types: [closed]
branches: [main]
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
env:
GOOGLE_MAPS_JS_SAMPLES_KEY: "${{ secrets.GOOGLE_MAPS_JS_SAMPLES_KEY }}"
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node
- uses: actions/setup-node@v3
with:
node-version: '22.x'
- run: npm i
- run: npm run build-prod
release:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
if: github.event.pull_request.merged == true
env:
GOOGLE_MAPS_JS_SAMPLES_KEY: "${{ secrets.GOOGLE_MAPS_JS_SAMPLES_KEY }}"
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node
- uses: actions/setup-node@v3
with:
node-version: '22.x'
- run: npm i
- run: npm run build-prod

- uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }}
- uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }}

- name: Install Firebase CLI
run: npm install -g firebase-tools
- name: Install Firebase CLI
run: npm install -g firebase-tools

- name: Deploy to Firebase Hosting
run: firebase deploy --only hosting
- name: Deploy to Firebase Hosting
run: firebase deploy --only hosting
Loading