typescript(monorepo-template): ci: some github actions
Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
parent
fdbe6758db
commit
af021663b0
35
typescript/monorepo-template/.github/workflows/release.yml
vendored
Normal file
35
typescript/monorepo-template/.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
name: Build and deploy 🚀
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install pnpm
|
||||
run: npm i -g pnpm
|
||||
- name: Config pnpm for ci
|
||||
run: pnpm config set verify-store-integrity false
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: 'I wonder if anyone sees this'
|
||||
- name: Install dependencies
|
||||
run: pnpm i
|
||||
- name: Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: pnpx semantic-release
|
38
typescript/monorepo-template/.github/workflows/test.yml
vendored
Normal file
38
typescript/monorepo-template/.github/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
name: Test ⛳
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [develop]
|
||||
pull_request:
|
||||
branches: [develop, master]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install pnpm
|
||||
run: npm i -g pnpm
|
||||
- name: Config pnpm for ci
|
||||
run: pnpm config set verify-store-integrity false
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: 'pnpm cache'
|
||||
- name: Install dependencies
|
||||
run: pnpm i
|
||||
- name: Build project
|
||||
run: pnpm run build
|
||||
- name: Test project
|
||||
run: pnpm test
|
|
@ -5,6 +5,7 @@
|
|||
"@semantic-release/commit-analyzer",
|
||||
"@semantic-release/release-notes-generator",
|
||||
"@semantic-release/changelog",
|
||||
"@semantic-release/npm",
|
||||
"@semantic-release/git",
|
||||
"@semantic-release/github"
|
||||
]
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"hygen",
|
||||
"plugin",
|
||||
"pnpm",
|
||||
"pnpx",
|
||||
"rollup",
|
||||
"show",
|
||||
"size",
|
||||
|
|
Loading…
Reference in a new issue