Skip to content

Commit db4386c

Browse files
chore: setup semantic-release
1 parent 063f47d commit db4386c

File tree

7 files changed

+2203
-87
lines changed

7 files changed

+2203
-87
lines changed

.auto-changelog

-5
This file was deleted.

.github/settings.yml

+3
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,6 @@ labels:
128128
- name: ":blue_heart:"
129129
color: ffffff
130130
description: "Dependabot"
131+
- name: "Status: Released"
132+
color: c2e0c6
133+
description: "It's now live."

.github/workflows/release.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
persist-credentials: false
17+
18+
- name: Setup NodeJs
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: "lts/*"
22+
23+
- name: Install dependencies
24+
run: yarn install --frozen-lockfile
25+
26+
- name: Build & Verify
27+
run: yarn verify
28+
29+
- name: Release
30+
run: semantic-release
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.releaserc

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
plugins:
2+
- - "@semantic-release/commit-analyzer"
3+
- preset: "eslint",
4+
- - "@semantic-release/release-notes-generator"
5+
- preset: "eslint",
6+
- - "@semantic-release/changelog"
7+
- changelogTitle: "# Changelog
8+
9+
All notable changes to this project will be documented in this file."
10+
- "@semantic-release/git"
11+
- "@semantic-release/npm"
12+
- - "@semantic-release/github"
13+
- releasedLabels:
14+
- "Status: Released"

README.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
[![npm version](https://img.shields.io/npm/v/eslint-plugin-functional.svg?style=flat)](https://www.npmjs.com/package/eslint-plugin-functional)
88
[![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)
99
[![Coverage Status](https://codecov.io/gh/jonaskello/eslint-plugin-functional/branch/master/graph/badge.svg)](https://codecov.io/gh/jonaskello/eslint-plugin-functional)
10+
[![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)
1011
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat)](https://github.com/prettier/prettier)
1112
[![MIT license](https://img.shields.io/github/license/jonaskello/eslint-plugin-functional.svg?style=flat)](https://opensource.org/licenses/MIT)
1213
[![GitHub Discussions](https://img.shields.io/github/discussions/jonaskello/eslint-plugin-functional)](https://github.com/jonaskello/eslint-plugin-functional/discussions)
@@ -296,13 +297,9 @@ In order to know which AST nodes are created for a snippet of TypeScript code yo
296297
> tl;dr: use `npx cz` instead of `git commit`.
297298
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).
298299

299-
## How to publish
300+
### How to publish
300301

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

307304
## Prior work
308305

package.json

+8-5
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@
5252
"lint-fix": "yarn lint --fix",
5353
"test": "nyc ava",
5454
"test-work": "TEST_ALL_FILE=1 ava",
55-
"verify": "yarn build && yarn lint && yarn build-tests && yarn test-compiled && rimraf build",
56-
"preversion": "yarn verify",
57-
"version": "auto-changelog -p && git add CHANGELOG.md",
58-
"postversion": "git push --tags && yarn publish --new-version $npm_package_version && git push && echo \"Successfully released version $npm_package_version!\""
55+
"verify": "yarn build && yarn lint && yarn build-tests && yarn test-compiled && rimraf build"
5956
},
6057
"dependencies": {
6158
"@typescript-eslint/experimental-utils": "^4.9.1",
@@ -71,6 +68,12 @@
7168
"@rollup/plugin-json": "^4.1.0",
7269
"@rollup/plugin-node-resolve": "^11.0.0",
7370
"@rollup/plugin-typescript": "^8.0.0",
71+
"@semantic-release/changelog": "^5.0.0",
72+
"@semantic-release/commit-analyzer": "^8.0.1",
73+
"@semantic-release/git": "^9.0.0",
74+
"@semantic-release/github": "^7.2.0",
75+
"@semantic-release/npm": "^7.0.9",
76+
"@semantic-release/release-notes-generator": "^9.0.1",
7477
"@types/dedent": "^0.7.0",
7578
"@types/eslint": "^7.2.6",
7679
"@types/estree": "^0.0.46",
@@ -80,7 +83,6 @@
8083
"@types/rollup-plugin-auto-external": "^2.0.2",
8184
"@typescript-eslint/eslint-plugin": "^4.28.4",
8285
"@typescript-eslint/parser": "^4.28.4",
83-
"auto-changelog": "^2.2.1",
8486
"ava": "^3.15.0",
8587
"babel-eslint": "^10.0.2",
8688
"chalk": "^4.1.2",
@@ -116,6 +118,7 @@
116118
"rimraf": "^3.0.0",
117119
"rollup": "^2.34.2",
118120
"rollup-plugin-auto-external": "^2.0.0",
121+
"semantic-release": "^17.4.4",
119122
"shelljs": "^0.8.3",
120123
"ts-node": "^10.1.0",
121124
"tsc-prog": "^2.2.1",

0 commit comments

Comments
 (0)