⬆️ Upgrade eslint monorepo to v10.4.1 #115
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: Check and Release | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "The version to release (e.g., 1.2.3). The 'v' prefix is added automatically." | |
| required: true | |
| jobs: | |
| actionlint: | |
| uses: RubberDuckCrew/.github/.github/workflows/action-actionlint.yml@845e392790542cd3f46c65785222e341b4d2f0e1 # v2.4.1 | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 24.15.0 | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Check formatting | |
| run: npm run lint | |
| - name: Run tests | |
| run: npm test | |
| release: | |
| name: Release | |
| if: github.event_name == 'workflow_dispatch' | |
| needs: [actionlint, test] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| env: | |
| VERSION: ${{ github.event.inputs.version }} | |
| steps: | |
| - name: Validate version input | |
| run: | | |
| if ! echo "$VERSION" | grep -E -x '^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$' >/dev/null; then | |
| echo "ERROR: VERSION is not a valid semver: '$VERSION'" | |
| exit 1 | |
| fi | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0 | |
| with: | |
| tag_name: "v${{ env.VERSION }}" | |
| name: "🔖 gitdone-cloudflare-worker ${{ env.VERSION }}" | |
| draft: true | |
| prerelease: false |