diff --git a/typescript/monorepo-template/.github/workflows/release.yml b/typescript/monorepo-template/.github/workflows/release.yml new file mode 100644 index 0000000..0514161 --- /dev/null +++ b/typescript/monorepo-template/.github/workflows/release.yml @@ -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 diff --git a/typescript/monorepo-template/.github/workflows/test.yml b/typescript/monorepo-template/.github/workflows/test.yml new file mode 100644 index 0000000..d365049 --- /dev/null +++ b/typescript/monorepo-template/.github/workflows/test.yml @@ -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 diff --git a/typescript/monorepo-template/.releaserc.json b/typescript/monorepo-template/.releaserc.json index bf07d41..7f03d10 100644 --- a/typescript/monorepo-template/.releaserc.json +++ b/typescript/monorepo-template/.releaserc.json @@ -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" ] diff --git a/typescript/monorepo-template/.vscode/settings.json b/typescript/monorepo-template/.vscode/settings.json index 38dd216..5fa9ae4 100644 --- a/typescript/monorepo-template/.vscode/settings.json +++ b/typescript/monorepo-template/.vscode/settings.json @@ -6,6 +6,7 @@ "hygen", "plugin", "pnpm", + "pnpx", "rollup", "show", "size",