Bump actions/checkout from 5 to 6 #783
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| run_install: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version-file: "package.json" | |
| cache: "pnpm" | |
| - name: Install deps | |
| run: | | |
| pnpm install | |
| - name: Run tests | |
| run: | | |
| pnpm test | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| run_install: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version-file: "package.json" | |
| cache: "pnpm" | |
| - name: Install deps | |
| run: | | |
| pnpm install | |
| - name: Lint | |
| run: | | |
| pnpm lint | |
| get_current_tag: | |
| name: Get Current Tag | |
| runs-on: ubuntu-latest | |
| outputs: | |
| tag: ${{ steps.get_tag.outputs.tag }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get Tag | |
| id: get_tag | |
| run: echo "tag=$(git tag --points-at HEAD | head -n 1)" >> "$GITHUB_OUTPUT" | |
| publish: | |
| name: Publish release | |
| runs-on: ubuntu-latest | |
| needs: [test, lint, get_current_tag] | |
| if: needs.get_current_tag.outputs.tag != '' | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: refs/tags/${{ needs.get_current_tag.outputs.tag }} | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| run_install: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version-file: "package.json" | |
| cache: "pnpm" | |
| - name: Build plugin | |
| run: | | |
| pnpm install | |
| pnpm build | |
| - name: Publish release | |
| uses: ghalactic/github-release-from-tag@v6 | |
| with: | |
| generateReleaseNotes: "true" | |
| assets: | | |
| - path: main.js | |
| - path: manifest.json | |
| - path: styles.css |