Skip to content

Commit

Permalink
chore(ci): set up semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
kenany committed Apr 1, 2021
1 parent 5f75954 commit 45cc7b8
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 7 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: release
on:
push:
branches:
- master
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2.1.5
with:
node-version: 14
- name: Update npm
run: |
npm install -g npm
npm --version
- uses: actions/checkout@v2.3.4
- name: Install dependencies
uses: bahmutov/npm-install@v1.7.1
with:
useLockFile: false
- name: Release
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock = false
12 changes: 12 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/github",
"@semantic-release/npm",
"@semantic-release/git"
],
"preset": "conventionalcommits",
"tagFormat": "${version}"
}
19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"repository": "KenanY/secure-random-octet",
"license": "MIT",
"author": "Kenan Yildirim <kenan@kenany.me> (http://kenany.me/)",
"author": "Kenan Yildirim <kenan@kenany.me> (https://kenany.me/)",
"main": "index.js",
"files": [
"index.js",
Expand All @@ -20,6 +20,7 @@
"lint": "eslint *.js test/*.js",
"tests-only": "tape test/index.js",
"coverage": "nyc npm run -s tests-only",
"release": "semantic-release",
"pretest": "npm run -s lint",
"test": "npm run -s tests-only"
},
Expand All @@ -28,12 +29,16 @@
},
"devDependencies": {
"@kenan/eslint-config": "^8.0.4",
"@kenan/renovate-config": "1.5.0",
"@kenan/renovate-config": "^1.5.0",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"conventional-changelog-conventionalcommits": "^4.5.0",
"eslint": "^7.23.0",
"lodash.every": "4.6.0",
"lodash.isfunction": "3.0.9",
"lodash.isnumber": "3.0.3",
"nyc": "15.1.0",
"tape": "5.2.2"
"lodash.every": "^4.6.0",
"lodash.isfunction": "^3.0.9",
"lodash.isnumber": "^3.0.3",
"nyc": "^15.1.0",
"semantic-release": "^17.4.2",
"tape": "^5.2.2"
}
}

0 comments on commit 45cc7b8

Please sign in to comment.