Skip to content

Commit

Permalink
docs: add release docs for open-sauced/conventional-commit (open-sauc…
Browse files Browse the repository at this point in the history
…ed#27)

* docs: add pre-release docs for open-sauced/conventional-commit

* build: remove release tooling in favor of open-sauced/semantic-release-conventional-config:3.0.0

* docs: update generic semantic release docs

* docs: adjust workflow docs for semantic release

closes open-sauced#26

closes open-sauced#30

closes open-sauced#31
  • Loading branch information
0-vortex authored Dec 4, 2021
1 parent 98c672e commit 0937830
Show file tree
Hide file tree
Showing 8 changed files with 10,266 additions and 19,574 deletions.
3 changes: 0 additions & 3 deletions .czrc

This file was deleted.

58 changes: 7 additions & 51 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,13 @@ jobs:
- name: "🔧 setup node"
uses: actions/setup-node@v2.1.5
with:
node-version: 14

- name: "🔧 setup cache"
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/npm-shrinkwrap.json', '**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
node-version: 16

- name: "🔧 install npm@latest"
run: npm i -g npm@latest

- name: "📦 install dependencies"
run: npm ci
uses: bahmutov/npm-install@v1

- name: "🚀 static app"
run: npm run build
Expand All @@ -86,7 +78,7 @@ jobs:
release:
environment:
name: production
url: https://github.com/${{ github.repository }}/releases/tag/v${{ steps.release.outputs.version }}
url: https://github.com/${{ github.repository }}/releases/tag/${{ env.RELEASE_TAG }}
name: Semantic release
needs:
- docker
Expand All @@ -98,25 +90,6 @@ jobs:
with:
fetch-depth: 0

- name: "🔧 setup node"
uses: actions/setup-node@v2.1.5
with:
node-version: 14

- name: "🔧 setup cache"
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/npm-shrinkwrap.json', '**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: "🔧 install npm@latest"
run: npm i -g npm@latest

- name: "📦 install dependencies"
run: npm ci

- name: "📂 download docker artifacts"
uses: actions/download-artifact@v2
with:
Expand All @@ -135,19 +108,10 @@ jobs:
path: /tmp/build

- name: "🚀 release"
id: release
id: semantic-release
uses: docker://ghcr.io/open-sauced/semantic-release-conventional-config:3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_USERNAME: ${{ github.repository_owner }}
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_NAME: ${{ github.event.commits[0].author.username }}
GIT_AUTHOR_EMAIL: ${{ github.event.commits[0].author.email }}
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }}
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
run: |
cp -R /tmp/build ./build
npm run semantic-release
echo "::set-output name=version::$(cat package.json | jq -r '.version')"

deploy:
name: Deploy to static
Expand Down Expand Up @@ -180,21 +144,13 @@ jobs:
- name: "🔧 setup node"
uses: actions/setup-node@v2.1.5
with:
node-version: 14

- name: "🔧 setup cache"
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/npm-shrinkwrap.json') }}
restore-keys: |
${{ runner.os }}-node-
node-version: 16

- name: "🔧 install npm@latest"
run: npm i -g npm@latest

- name: "📦 install dependencies"
run: npm ci
uses: bahmutov/npm-install@v1

- name: "📂 copy artifacts"
run: cp -R /home/runner/build .
Expand Down
80 changes: 80 additions & 0 deletions docs/maintainers/conventional-commit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# @open-sauced/conventional-commit

## Description

The `npm` package `@open-sauced/conventional-commit` is designed to help users `git commit` using [commitizen](https://github.com/commitizen/cz-cli) and [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/).

## Dependencies

This package uses the following modules:

- [cz-cli](https://github.com/commitizen/cz-cli)
- [cz-conventional-changelog](https://github.com/commitizen/cz-conventional-changelog)

## Installation

```shell
npm install --save-dev @open-sauced/conventional-commit
```

Add the verification scripts to your `scripts` section in the `package.json` file:

```json
{
"scripts": {
"push": "npx @open-sauced/conventional-commit"
}
}
```

The reason why we provide `npx` in the `scripts` section is for the people using this as a development enhancement, interactive configurations or trimmed dependency trees, where using `npx` is preferred over installing all the dependencies at once.

## Usage

All you have to do is run the script next to your `package.json`:

```shell
npx @open-sauced/conventional-commit
# or
npx conventional-commit
```

## Advanced usage

The most common use case for this package is to run it instead of the `git commit` command inside your `npm` scripts:

```json
{
"scripts": {
"push": "npx @open-sauced/conventional-commit"
}
}
```

or

```json
{
"scripts": {
"push": "npx conventional-commit"
}
}
```

If you want to ensure local-only usage:

```json
{
"scripts": {
"push": "conventional-commit"
}
}
```

## FAQ

## Contributing

We're always happy to onboard people into open source!

Check out the repository at [@open-sauced/conventional-commit](https://github.com/open-sauced/conventional-commit) ❤️
Loading

0 comments on commit 0937830

Please sign in to comment.