Skip to content

Commit

Permalink
Merge pull request #9 from ducktors/add-changesets
Browse files Browse the repository at this point in the history
feat: add chanegsets for monorepo, app and lib
  • Loading branch information
fox1t committed Feb 15, 2023
2 parents 910132f + 4a51e3a commit 87c9a92
Show file tree
Hide file tree
Showing 23 changed files with 2,651 additions and 65 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-crews-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-crane": minor
---

initial release
15 changes: 15 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"privatePackages": {
"version": true,
"tag": true
}
}
36 changes: 36 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 0
commit-message:
prefix: "fix(deps)"
prefix-development: "chore(deps):"
assignees:
- "matteovivona"
reviewers:
- "matteovivona"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "chore(actions)"
assignees:
- "matteovivona"
reviewers:
- "matteovivona"

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "fix(docker)"
assignees:
- "matteovivona"
reviewers:
- "matteovivona"
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## In this PR:

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)

## Issues reference:
- https://github.com/ducktors/crane/issues/
- https://github.com/ducktors/crane/issues/

### Checklist:

* [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/ducktors/crane/pulls) for the same update/change?
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
* [ ] Have you lint your code with `pnpm lint` locally prior to submission?
* [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
* [ ] Have you written new tests for your core changes, as applicable?
* [ ] Have you successfully ran build with `pnpm build` of your changes locally?
* [ ] Have you successfully ran tests with `pnpm test` of your changes locally?
* [ ] Have you commit using [Conventional Commits](https://github.com/ducktors/crane#how-to-commit)?
35 changes: 35 additions & 0 deletions .github/workflows/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: 🐛 Bug report
about: Create a report to help us improve
---

**Please read this entire template before posting any issue. If you ignore these instructions
and post an issue here that does not follow the instructions, your issue might be closed,
locked, and assigned the `missing discussion` label.**

## 🐛 Bug Report

A clear and concise description of what the bug is.

## To Reproduce

Steps to reproduce the behavior:

Paste your code here:

```js
```

## Expected behavior

A clear and concise description of what you expected to happen.

Paste the results here:

```js
```

## Your Environment

- _os_: Mac, Windows, Linux
- _any other relevant information_
20 changes: 20 additions & 0 deletions .github/workflows/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: 🚀 Feature Proposal
about: Submit a proposal for a new feature
---

**Please read this entire template before posting any issue. If you ignore these instructions
and post an issue here that does not follow the instructions, your issue might be closed,
locked, and assigned the `missing discussion` label.**

## 🚀 Feature Proposal

A clear and concise description of what the feature is.

## Motivation

Please outline the motivation for the proposal.

## Example

Please provide an example for how this feature would be used.
41 changes: 41 additions & 0 deletions .github/workflows/ISSUE_TEMPLATE/regression.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: 💥 Regression Report
about: Report unexpected behavior that worked in previous versions
---

**Please read this entire template before posting any issue. If you ignore these instructions
and post an issue here that does not follow the instructions, your issue might be closed,
locked, and assigned the `missing discussion` label.**

## 💥 Regression Report

A clear and concise description of what the regression is.

## Last working version

Worked up to version:

Stopped working in version:

## To Reproduce

Steps to reproduce the behavior:

Paste your code here:

```js
```

## Expected behavior

A clear and concise description of what you expected to happen.

Paste the results here:

```js
```

## Your Environment

- _os_: Mac, Windows, Linux
- _any other relevant information_
46 changes: 46 additions & 0 deletions .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Changeset

on:
push:
branches:
- main

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- uses: pnpm/action-setup@v2
with:
version: 7

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Create Release Pull Request
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.DUCKTORS_NPM_TOKEN }}
48 changes: 43 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,32 @@ name: CI

on:
merge_group:
pull_request:
push:

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

jobs:
commitlint:
name: Commit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Remove tsconfig.json
run: rm tsconfig.json # https://github.com/wagoid/commitlint-github-action/issues/560#issuecomment-1277659864

- name: Check commit message
uses: wagoid/commitlint-github-action@v5
with:
configFile: commitlint.config.js
failOnWarnings: false
helpURL: https://github.com/ducktors/turborepo-remote-cache#how-to-commit

build:
runs-on: ${{ matrix.os }}
name: Build
Expand All @@ -34,6 +52,7 @@ jobs:
run: pnpm lint
- name: Build
run: pnpm build

test:
runs-on: ubuntu-latest
name: Test
Expand All @@ -43,14 +62,33 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16

- uses: pnpm/action-setup@v2
with:
version: 7.27.0
- name: Install with pnpm
run: pnpm install
version: 7

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run tests
run: pnpm test:ci

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage/lcov.info
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm exec commitlint --edit "$1"
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@
## Opinionated Ducktors' Project Generator
[![Coverage Status](https://coveralls.io/repos/github/ducktors/crane/badge.svg?branch=add-coveralls)](https://coveralls.io/github/ducktors/crane?branch=add-coveralls)




### Changesets
They work out of the box thanks to the with-changesets preset. However, you need to add the changesets-bot to your repo manually. You can do that by going to the [GitHub Marketplace](https://github.com/apps/changeset-bot)

__WIP__
- [ ] GitHub release workflows
- [ ] conventional commits
- [ ] commitlint
- [ ] semantic release for non-monorepo
- [ ] changesets for monorepo
- [ ] crane import: adds crane structure to an existing repository

Loading

0 comments on commit 87c9a92

Please sign in to comment.