Skip to content

Commit

Permalink
chore: setup semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaStevens committed Aug 12, 2021
1 parent 063f47d commit db4386c
Show file tree
Hide file tree
Showing 7 changed files with 2,203 additions and 87 deletions.
5 changes: 0 additions & 5 deletions .auto-changelog

This file was deleted.

3 changes: 3 additions & 0 deletions .github/settings.yml
Expand Up @@ -128,3 +128,6 @@ labels:
- name: ":blue_heart:"
color: ffffff
description: "Dependabot"
- name: "Status: Released"
color: c2e0c6
description: "It's now live."
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,33 @@
name: Publish

on:
push:
branches:
- master

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false

- name: Setup NodeJs
uses: actions/setup-node@v2
with:
node-version: "lts/*"

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

- name: Build & Verify
run: yarn verify

- name: Release
run: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
14 changes: 14 additions & 0 deletions .releaserc
@@ -0,0 +1,14 @@
plugins:
- - "@semantic-release/commit-analyzer"
- preset: "eslint",
- - "@semantic-release/release-notes-generator"
- preset: "eslint",
- - "@semantic-release/changelog"
- changelogTitle: "# Changelog

All notable changes to this project will be documented in this file."
- "@semantic-release/git"
- "@semantic-release/npm"
- - "@semantic-release/github"
- releasedLabels:
- "Status: Released"
9 changes: 3 additions & 6 deletions README.md
Expand Up @@ -7,6 +7,7 @@
[![npm version](https://img.shields.io/npm/v/eslint-plugin-functional.svg?style=flat)](https://www.npmjs.com/package/eslint-plugin-functional)
[![CI](https://github.com/jonaskello/eslint-plugin-functional/actions/workflows/ci.yml/badge.svg)](https://github.com/jonaskello/eslint-plugin-functional/actions/workflows/ci.yml)
[![Coverage Status](https://codecov.io/gh/jonaskello/eslint-plugin-functional/branch/master/graph/badge.svg)](https://codecov.io/gh/jonaskello/eslint-plugin-functional)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat)](https://github.com/semantic-release/semantic-release)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat)](https://github.com/prettier/prettier)
[![MIT license](https://img.shields.io/github/license/jonaskello/eslint-plugin-functional.svg?style=flat)](https://opensource.org/licenses/MIT)
[![GitHub Discussions](https://img.shields.io/github/discussions/jonaskello/eslint-plugin-functional)](https://github.com/jonaskello/eslint-plugin-functional/discussions)
Expand Down Expand Up @@ -296,13 +297,9 @@ In order to know which AST nodes are created for a snippet of TypeScript code yo
> tl;dr: use `npx cz` instead of `git commit`.
Commit messages must follow [Conventional Commit messages guidelines](https://www.conventionalcommits.org/en/v1.0.0/). You can use `npx cz` instead of `git commit` to run a interactive prompt to generate the commit message. We've customize the prompt specifically for this project. For more information see [commitizen](https://github.com/commitizen/cz-cli#readme).

## How to publish
### How to publish

```
yarn version --patch
yarn version --minor
yarn version --major
```
Publishing is handled by [semantic release](https://github.com/semantic-release/semantic-release#readme) - there shouldn't be any need to publish manually.

## Prior work

Expand Down
13 changes: 8 additions & 5 deletions package.json
Expand Up @@ -52,10 +52,7 @@
"lint-fix": "yarn lint --fix",
"test": "nyc ava",
"test-work": "TEST_ALL_FILE=1 ava",
"verify": "yarn build && yarn lint && yarn build-tests && yarn test-compiled && rimraf build",
"preversion": "yarn verify",
"version": "auto-changelog -p && git add CHANGELOG.md",
"postversion": "git push --tags && yarn publish --new-version $npm_package_version && git push && echo \"Successfully released version $npm_package_version!\""
"verify": "yarn build && yarn lint && yarn build-tests && yarn test-compiled && rimraf build"
},
"dependencies": {
"@typescript-eslint/experimental-utils": "^4.9.1",
Expand All @@ -71,6 +68,12 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.0.0",
"@rollup/plugin-typescript": "^8.0.0",
"@semantic-release/changelog": "^5.0.0",
"@semantic-release/commit-analyzer": "^8.0.1",
"@semantic-release/git": "^9.0.0",
"@semantic-release/github": "^7.2.0",
"@semantic-release/npm": "^7.0.9",
"@semantic-release/release-notes-generator": "^9.0.1",
"@types/dedent": "^0.7.0",
"@types/eslint": "^7.2.6",
"@types/estree": "^0.0.46",
Expand All @@ -80,7 +83,6 @@
"@types/rollup-plugin-auto-external": "^2.0.2",
"@typescript-eslint/eslint-plugin": "^4.28.4",
"@typescript-eslint/parser": "^4.28.4",
"auto-changelog": "^2.2.1",
"ava": "^3.15.0",
"babel-eslint": "^10.0.2",
"chalk": "^4.1.2",
Expand Down Expand Up @@ -116,6 +118,7 @@
"rimraf": "^3.0.0",
"rollup": "^2.34.2",
"rollup-plugin-auto-external": "^2.0.0",
"semantic-release": "^17.4.4",
"shelljs": "^0.8.3",
"ts-node": "^10.1.0",
"tsc-prog": "^2.2.1",
Expand Down

0 comments on commit db4386c

Please sign in to comment.