Skip to content

Commit

Permalink
Build: Added semantic-relase config and plugins.
Browse files Browse the repository at this point in the history
  • Loading branch information
RogWilco committed Sep 1, 2020
1 parent c4e4905 commit a0f89c7
Show file tree
Hide file tree
Showing 5 changed files with 3,591 additions and 66 deletions.
44 changes: 40 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ on:
pull_request:
branches: [master]
jobs:
build:
verify:
if: "!contains(github.event.head_commit.message, '[skip ci]') && !startsWith(github.event.head_commit.message, 'Release:')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Environment (Node 10.x)
- name: Environment
uses: actions/[email protected]
with:
node-version: 10.x
Expand All @@ -19,10 +20,45 @@ jobs:
run: npx yarn install --frozen-lockfile
- name: Tests
run: yarn test
- name: Code Coverage
- name: Coverage
uses: codecov/[email protected]
with:
name: Try
token: ${{secrets.CODECOV_TOKEN}}
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./out/coverage/
fail_ci_if_error: true
publish:
needs: verify
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Environment
uses: actions/[email protected]
with:
node-version: 10.x
check-latest: true
- name: Dependencies
run: npx yarn install --frozen-lockfile
- name: Import GPG
id: import_gpg
uses: crazy-max/[email protected]
with:
git_user_signingkey: true
git_commit_gpgsign: true
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GPG_KEY_ID: ${{ steps.import_gpg.outputs.keyid }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GIT_USERNAME: ${{ steps.import_gpg.outputs.name }}
GIT_EMAIL: ${{ steps.import_gpg.outputs.email }}
GIT_AUTHOR_NAME: ${{ steps.import_gpg.outputs.name }}
GIT_AUTHOR_EMAIL: ${{ steps.import_gpg.outputs.email }}
GIT_COMMITTER_NAME: ${{ steps.import_gpg.outputs.name }}
GIT_COMMITTER_EMAIL: ${{ steps.import_gpg.outputs.email }}
run: npx semantic-release
23 changes: 23 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"branch": "master",
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"releaseRules": [{ "type": "Release", "release": false }]
}
],
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": ["CHANGELOG.md", "package.json", "yarn.lock"],
"message": "Release: ${nextRelease.version}\n\n${nextRelease.notes}"
}
],
"@semantic-release/github"
],
"preset": "eslint"
}
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
"engines": {
"node": "10.x"
},
"publishConfig": {
"access": "public"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": ["dist/**/*"],
"scripts": {
"build": "tsc --project tsconfig-build.json",
Expand All @@ -33,10 +35,14 @@
"test": "jest"
},
"devDependencies": {
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@types/jest": "^26.0.9",
"@types/node": "^14.0.27",
"conventional-changelog-eslint": "^3.0.8",
"jest": "^26.2.2",
"jest-extended": "^0.11.5",
"semantic-release": "^17.1.1",
"ts-jest": "^26.1.4",
"typedoc": "^0.19.0",
"typescript": "^4.0.2",
Expand Down
4 changes: 1 addition & 3 deletions tsconfig-dist.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"outDir": "dist/",
"declarationMap": false,
"sourceMap": false,
"sourceRoot": "",
"removeComments": true,
"preserveConstEnums": false
"sourceRoot": ""
},
"extends": "./tsconfig.json",
"exclude": ["build", "dist", "**/*.test.ts"]
Expand Down
Loading

0 comments on commit a0f89c7

Please sign in to comment.