diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 0000000..786f742 --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,35 @@ +name: autofix.ci + +on: + push: + branches: + - main + + pull_request: + branches: + - main + +jobs: + autofix: + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: pnpm + registry-url: 'https://registry.npmjs.org' + + - name: Install Dependencies + run: pnpm i + + - name: Lint + run: pnpm lint:fix + + - uses: autofix-ci/action@v1 \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f8bc9c9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,42 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + release: + permissions: + id-token: write + contents: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Set node + uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: pnpm + registry-url: 'https://registry.npmjs.org' + + - run: pnpm dlx changelogithub + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Install Dependencies + run: pnpm i + + - name: PNPM build + run: pnpm run build + + - name: Publish to VSCE + run: pnpm dlx @vscode/vsce publish --no-dependencies + env: + VSCE_TOKEN: ${{secrets.VSCE_TOKEN}} \ No newline at end of file diff --git a/package.json b/package.json index 34a61e6..5db6cd9 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,9 @@ "typecheck": "tsc --noEmit", "vscode:prepublish": "pnpm run build", "package": "vsce package --no-dependencies", - "publish": "vsce publish --no-dependencies" + "publish": "vsce publish --no-dependencies", + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "devDependencies": { "@antfu/eslint-config": "^2.27.1",