fix: add script.container.ui scope so cloned decks can open dialogs #3
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
| name: build-bundle | |
| # Rebuilds the self-update bundle (dist/bundle.json + dist/version.json) that | |
| # cloned decks pull via src/util/self_update.js. Runs on source changes only. | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "src/**" | |
| - "appsscript.json" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| # Fail fast if any top-level function name collides (Apps Script flattens | |
| # all .js into one global namespace, so duplicates silently shadow). | |
| - name: Check duplicate global function names | |
| run: node scripts/check-dup-functions.mjs | |
| # appsscript.json is gitignored; the real manifest source is the example. | |
| - name: Materialize manifest | |
| run: cp appsscript.example.json appsscript.json | |
| - name: Build bundle | |
| run: node scripts/build-bundle.mjs | |
| - name: Commit dist + stamped version | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add dist/ src/util/version.js | |
| if git diff --cached --quiet; then | |
| echo "No bundle changes" | |
| else | |
| # [skip ci] so neither this workflow nor clasp-push re-runs on the commit. | |
| git commit -m "chore: build self-update bundle ${GITHUB_SHA} [skip ci]" | |
| git push | |
| fi |