2024-01-29 03:08:00 +00:00
|
|
|
variables:
|
|
|
|
- &install_pnpm "corepack enable pnpm"
|
|
|
|
|
2024-01-24 23:11:20 +00:00
|
|
|
steps:
|
2024-01-29 03:08:00 +00:00
|
|
|
install:
|
2023-05-10 15:15:51 +00:00
|
|
|
image: node:alpine
|
2023-03-27 16:19:19 +00:00
|
|
|
commands:
|
2024-01-29 03:08:00 +00:00
|
|
|
- *install_pnpm
|
|
|
|
- pnpm i
|
2024-03-27 14:12:49 +00:00
|
|
|
when:
|
|
|
|
- event: pull_request
|
2023-03-27 16:19:19 +00:00
|
|
|
|
2024-01-29 03:08:00 +00:00
|
|
|
lint:
|
2023-05-10 15:15:51 +00:00
|
|
|
image: node:alpine
|
2023-03-27 16:19:19 +00:00
|
|
|
commands:
|
2024-01-29 03:08:00 +00:00
|
|
|
- *install_pnpm
|
|
|
|
- pnpm lint
|
2024-03-27 14:12:49 +00:00
|
|
|
when:
|
|
|
|
- event: pull_request
|
2023-03-27 16:19:19 +00:00
|
|
|
|
|
|
|
npm_publish:
|
2023-05-10 15:15:51 +00:00
|
|
|
image: node:alpine
|
2023-03-27 16:19:19 +00:00
|
|
|
commands:
|
2024-01-29 03:08:00 +00:00
|
|
|
- *install_pnpm
|
2023-03-27 16:19:19 +00:00
|
|
|
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
|
|
|
|
- echo "email = tyhou13@gmx.com" >> ~/.npmrc
|
|
|
|
- npm publish
|
|
|
|
secrets: [npm_token]
|
|
|
|
when:
|
2024-03-27 14:12:49 +00:00
|
|
|
- event: tag
|