Update APIs #71
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
| # 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. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: Update APIs | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" # Runs every day at midnight | |
| workflow_dispatch: # Allows manual triggering | |
| jobs: | |
| update-apis: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: pnpm/action-setup@v3 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: "lts/*" | |
| cache: "pnpm" | |
| - run: pnpm i | |
| - run: pnpm ci:update | |
| - run: pnpm lint | |
| - run: pnpm check | |
| - uses: ./.github/actions/setup-xvfb | |
| - run: pnpm test | |
| - name: Check for changes | |
| id: changes | |
| uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0 | |
| with: | |
| files: packages/vscode-extension/src/apis.ts | |
| - name: Create Changeset | |
| if: steps.changes.outputs.any_changed == 'true' | |
| run: | | |
| cat <<EOF > .changeset/update-apis.md | |
| --- | |
| "@google-workspace/vscode-extension": patch | |
| --- | |
| Update APIs and scopes via the Discovery service | |
| EOF | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 | |
| if: steps.changes.outputs.any_changed == 'true' | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "fix: update APIs via Discovery service" | |
| title: "fix: update APIs via discovery service" | |
| body: "This PR updates the APIs based on the latest Discovery documents." | |
| branch: "update-apis" | |
| delete-branch: true |