diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index 5d71b0650..f32ca55af 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -1,13 +1,6 @@ -name: autofix.ci # needed to securely identify the workflow - -on: - pull_request: - push: - branches: ["main"] - -permissions: - contents: read - +name: autofix.ci +on: { push: {}, pull_request: {} } +permissions: { contents: read } jobs: autofix: runs-on: ubuntu-latest @@ -15,13 +8,9 @@ jobs: - uses: actions/checkout@v5 - run: npm i -fg corepack && corepack enable - uses: actions/setup-node@v4 - with: - node-version: 22 - cache: "pnpm" + with: { node-version: lts-latest, cache: 'pnpm' } - run: pnpm install - - run: pnpm run gen-drivers - - name: Fix lint issues - run: pnpm run lint:fix + - run: pnpm lint:fix + - run: pnpm automd - uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 - with: - commit-message: "chore: apply automated updates" + with: { commit-message: 'chore: apply automated updates' } diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 000000000..2f2e0a488 --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,26 @@ +name: checks +on: { push: {}, pull_request: {} } +jobs: + checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - run: npm i -fg corepack && corepack enable + - uses: actions/setup-node@v4 + with: { node-version: lts-latest, cache: 'pnpm' } + - uses: denoland/setup-deno@v2 + with: { deno-version: v2.x } + - run: pnpm install + - run: pnpm lint + - run: pnpm test:types + - run: pnpm build + - run: pnpm vitest --coverage + # env: + # VITE_UPSTASH_REDIS_REST_URL: ${{ secrets.VITE_UPSTASH_REDIS_REST_URL }} + # VITE_UPSTASH_REDIS_REST_TOKEN: ${{ secrets.VITE_UPSTASH_REDIS_REST_TOKEN }} + # VITE_VERCEL_BLOB_READ_WRITE_TOKEN: ${{ secrets.VITE_VERCEL_BLOB_READ_WRITE_TOKEN }} + # VITE_CLOUDFLARE_ACC_ID: ${{ secrets.VITE_CLOUDFLARE_ACC_ID }} + # VITE_CLOUDFLARE_KV_NS_ID: ${{ secrets.VITE_CLOUDFLARE_KV_NS_ID }} + # VITE_CLOUDFLARE_TOKEN: ${{ secrets.VITE_CLOUDFLARE_TOKEN }} + # VITE_UPLOADTHING_TOKEN: ${{ secrets.VITE_UPLOADTHING_TOKEN }} + - uses: codecov/codecov-action@v5 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index ee3f7c88c..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: ci - -on: - push: - branches: - - main - pull_request: - branches: - - main - -permissions: - id-token: write - -jobs: - ci: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - run: npm i -fg corepack && corepack enable - - uses: actions/setup-node@v4 - with: - node-version: 22 - cache: "pnpm" - - uses: denoland/setup-deno@v2 - with: - deno-version: v2.x - - run: pnpm install - - run: pnpm lint - - run: pnpm test:types - - run: pnpm build - - run: pnpm vitest --coverage - env: - VITE_UPSTASH_REDIS_REST_URL: ${{ secrets.VITE_UPSTASH_REDIS_REST_URL }} - VITE_UPSTASH_REDIS_REST_TOKEN: ${{ secrets.VITE_UPSTASH_REDIS_REST_TOKEN }} - VITE_VERCEL_BLOB_READ_WRITE_TOKEN: ${{ secrets.VITE_VERCEL_BLOB_READ_WRITE_TOKEN }} - VITE_CLOUDFLARE_ACC_ID: ${{ secrets.VITE_CLOUDFLARE_ACC_ID }} - VITE_CLOUDFLARE_KV_NS_ID: ${{ secrets.VITE_CLOUDFLARE_KV_NS_ID }} - VITE_CLOUDFLARE_TOKEN: ${{ secrets.VITE_CLOUDFLARE_TOKEN }} - VITE_UPLOADTHING_TOKEN: ${{ secrets.VITE_UPLOADTHING_TOKEN }} - - uses: codecov/codecov-action@v5 - - name: nightly release - if: | - github.event_name == 'push' && - !startsWith(github.event.head_commit.message, 'docs') - run: | - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc && - pnpm changelogen --canary nightly --publish - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_CONFIG_PROVENANCE: true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..b11adcd8f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,15 @@ +name: publish +on: { push: { branches: [main] } } +permissions: { id-token: write, contents: read } +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: { fetch-depth: 0 } + - run: npm i -fg corepack && corepack enable + - uses: actions/setup-node@v4 + with: { node-version: lts-latest, cache: 'pnpm' } + - run: pnpm install + - run: pnpm changelogen --bump --canary nightly + - run: npm publish --tag latest