🔄 Update @wxt-dev/browser #245
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: 🔄 Update @wxt-dev/browser | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * *' # Every day at midnight | |
| permissions: | |
| contents: read | |
| jobs: | |
| sync: | |
| name: 'Sync with @types/chrome' | |
| runs-on: ubuntu-latest | |
| if: github.repository_owner == 'wxt-dev' | |
| permissions: | |
| contents: write # Push version changes | |
| id-token: write # OIDC for NPM publishing | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| with: | |
| installArgs: --ignore-scripts | |
| - name: Update NPM | |
| run: sudo npm i -g npm@latest | |
| - name: Generate Latest Code | |
| working-directory: packages/browser | |
| run: pnpm gen | |
| - name: Run Checks | |
| working-directory: packages/browser | |
| run: pnpm check | |
| - name: Commit Changes | |
| id: commit | |
| uses: stefanzweifel/git-auto-commit-action@01d77ca6cb089da1360e540865f7d035c95aa199 # v6.0.1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| commit_message: 'fix: Upgrade `@wxt-dev/browser` to latest `@types/chrome` version' | |
| - name: Publish Package | |
| if: steps.commit.outputs.changes_detected == 'true' | |
| working-directory: packages/browser | |
| run: npm publish |