Skip to content

Commit

Permalink
Migrate to pnpm (#744)
Browse files Browse the repository at this point in the history
* Migrate to pnpm

* Fix
  • Loading branch information
int128 authored Mar 2, 2024
1 parent abf09bf commit 39cabf5
Show file tree
Hide file tree
Showing 6 changed files with 3,190 additions and 3,479 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
cache: yarn
- run: yarn
- run: yarn build
- run: yarn package
- run: corepack enable pnpm
- run: pnpm i
- run: pnpm build
- run: pnpm package
- uses: int128/release-typescript-action@94c45715849473c37ebdc66190c9ec4c9543e46b # v1.27.0
with:
# TODO: change this on the stable release
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/ts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- src/**
- tests/**
- '*.json'
- '*.lock'
- action.yaml
- .github/workflows/ts.yaml
push:
Expand All @@ -15,6 +16,7 @@ on:
- src/**
- tests/**
- '*.json'
- '*.lock'
- action.yaml
- .github/workflows/ts.yaml

Expand All @@ -27,11 +29,11 @@ jobs:
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
cache: yarn
- run: yarn
- run: yarn test
- run: yarn build
- run: yarn package
- run: corepack enable pnpm
- run: pnpm i
- run: pnpm test
- run: pnpm build
- run: pnpm package

- name: e2e-test
uses: ./
Expand All @@ -49,8 +51,8 @@ jobs:
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
cache: yarn
- run: yarn
- run: yarn lint --fix
- run: yarn format
- run: corepack enable pnpm
- run: pnpm i
- run: pnpm lint --fix
- run: pnpm format
- uses: int128/update-generated-files-action@1bf39f3aec4afa88c0c7060cdb0d88332c052991 # v2.48.0
29 changes: 11 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
This is a template of TypeScript action.
Inspired from https://github.com/actions/typescript-action.


## Features

- Ready to develop with the minimum configs
- Yarn
- Prettier
- ESLint
- tsconfig
Expand All @@ -16,7 +14,6 @@ Inspired from https://github.com/actions/typescript-action.
- Keep consistency of generated files
- Shipped with Renovate config


## Getting Started

Click `Use this template` to create a repository.
Expand All @@ -29,8 +26,8 @@ Then checkout your repository and test it. Node.js is required.
```console
$ git clone https://github.com/your/repo.git

$ yarn
$ yarn test
$ pnpm i
$ pnpm test
```

Create a pull request for a change.
Expand All @@ -43,20 +40,18 @@ $ gh pr create -fd

Once you merge a pull request, a new minor release (such as `v0.1.0`) is created.


### Stable release

When you want to create a stable release, change the major version in [release workflow](.github/workflows/release.yaml).

```yaml
- uses: int128/release-typescript-action@v1
with:
major-version: 1
- uses: int128/release-typescript-action@v1
with:
major-version: 1
```
Then a new stable release `v1.0.0` is created.


## Specification

To run this action, create a workflow as follows:
Expand All @@ -73,17 +68,15 @@ jobs:

### Inputs

| Name | Default | Description
|------|----------|------------
| `name` | (required) | example input

| Name | Default | Description |
| ------ | ---------- | ------------- |
| `name` | (required) | example input |

### Outputs

| Name | Description
|------|------------
| `example` | example output

| Name | Description |
| --------- | -------------- |
| `example` | example output |

## Development

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"scripts": {
"build": "tsc",
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"lint": "eslint **/*.ts",
"package": "ncc build --source-map --license licenses.txt",
"test": "jest"
Expand Down
Loading

0 comments on commit 39cabf5

Please sign in to comment.