ci: ⚙️update workflow #16
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 and Release | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - "master" | |
| # https://github.com/OWNER/REPO/settings/actions | |
| # MUST CHANGE GITHUB_TOKEN PERMISSION FROM READ TO WRITE | |
| # MUST CHANGE GITHUB_TOKEN PERMISSION ALLOW PULL REQUESTS | |
| # ⚠ ⚠ ⚠ You need merge pull request manually ⚠ ⚠ ⚠ | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| issues: write | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20.x | |
| - name: Install dependencies | |
| run: yarn --frozen-lockfile | |
| - run: xvfb-run -a yarn test | |
| if: runner.os == 'Linux' | |
| - uses: googleapis/release-please-action@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| release-type: node | |
| config-file: release-please-config.json |