Skip to content

Commit

Permalink
modernize project setup
Browse files Browse the repository at this point in the history
  • Loading branch information
IMax153 committed Sep 10, 2024
1 parent a511628 commit ebc76ef
Show file tree
Hide file tree
Showing 25 changed files with 4,985 additions and 2,848 deletions.
5 changes: 5 additions & 0 deletions .changeset/cyan-pumas-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/dtslint": patch
---

Modernize repository publication infrastructure
81 changes: 0 additions & 81 deletions .eslintrc.cjs

This file was deleted.

21 changes: 21 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Setup
description: Perform standard setup and install dependencies using pnpm.
inputs:
node-version:
description: The version of Node.js to install
required: true
default: 20.16.0

runs:
using: composite
steps:
- name: Install pnpm
uses: pnpm/action-setup@v3
- name: Install node
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: ${{ inputs.node-version }}
- name: Install dependencies
shell: bash
run: pnpm install
54 changes: 54 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Check

on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions: {}

jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/setup

types:
name: Types
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/setup
- run: pnpm check

lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/setup
- run: pnpm lint

test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/setup
- run: pnpm dtslint
53 changes: 0 additions & 53 deletions .github/workflows/main.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/pr.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release

on:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

permissions: {}

jobs:
release:
if: github.repository_owner == 'Effect-Ts'
name: Release
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/setup
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
version: pnpm changeset-version
publish: pnpm changeset-publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Snapshot

on:
pull_request:
branches: [main, next-minor, next-major]
workflow_dispatch:

permissions: {}

jobs:
snapshot:
name: Snapshot
if: github.repository_owner == 'Effect-Ts'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/setup
- name: Build package
run: pnpm build
- name: Create snapshot
id: snapshot
run: pnpx [email protected] publish --pnpm --comment=off
4 changes: 2 additions & 2 deletions dtslint/test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// $ExpectType 1
const a = 1
export const a = 1

// @ts-expect-error
const b: string = 1
export const b: string = 1
Loading

0 comments on commit ebc76ef

Please sign in to comment.