File tree Expand file tree Collapse file tree 4 files changed +66
-6
lines changed Expand file tree Collapse file tree 4 files changed +66
-6
lines changed Original file line number Diff line number Diff line change 1+ # Copyright 2025 Google LLC
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ name : dist-pr
16+
17+ on :
18+ push :
19+ branches :
20+ - dist # Trigger the workflow on pushes to the dist branch
21+
22+ jobs :
23+ approve-and-merge :
24+ runs-on : ubuntu-latest
25+ if : ${{ github.actor == 'github-actions[bot]' }}
26+ steps :
27+ - name : Checkout code
28+ uses : actions/checkout@v3
29+
30+ - name : Create Pull Request
31+ id : cpr
32+ run : |
33+ echo "pull_request_url=$(gh pr create --title "chore: automated output update (dist)" --body "This PR contains updated build output from the dist branch." --base main --head dist)" >> $GITHUB_OUTPUT
34+
35+ - name : Approve PR
36+ run : gh pr review --approve ${{ steps.cpr.outputs.pull_request_url }}
37+
38+ - name : Merge PR
39+ run : gh pr merge --auto --squash --delete-branch ${{ steps.cpr.outputs.pull_request_url }}
Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- # # Runs the release-please action for all new pushes to the main branch.
16- # # This updates the CHANGELOG.md, and uploads the contents of /dist to
17- # # the Cloud bucket. It does NOT release to Node, but it provides
18- # # handy version incrementing which is useful for us.
19-
2015name : Release
2116
2217on :
4439 with :
4540 node-version : ' 22.x'
4641 - run : npm i
47- - run : npm run build-all
42+ - run : npm run build-prod
4843
4944 - uses : google-github-actions/auth@v1
5045 with :
Original file line number Diff line number Diff line change 44 "description" : " Samples for the Google Maps JavaScript API." ,
55 "scripts" : {
66 "build-all" : " npm run generate-index && npm run clean && npm run build --workspaces" ,
7+ "build-prod" : " npm run generate-index && npm run clean && npm run build --workspaces && ./.git/hooks/post-build" ,
78 "clean" : " bash samples/clean.sh" ,
89 "generate-index" : " bash samples/generate-index.sh"
910 },
Original file line number Diff line number Diff line change 1+ # Copyright 2025 Google LLC
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ #! /bin/bash
16+
17+ # Checkout the dist branch
18+ git checkout dist || git checkout -b dist
19+
20+ # Add and commit the changes to the dist folder
21+ git add dist
22+ git commit -m " Update dist folder"
23+
24+ # Push the changes to the dist branch
25+ git push origin dist
You can’t perform that action at this time.
0 commit comments