1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-12-08 00:44:30 +01:00

chore: setup semantic-release

This commit is contained in:
divlo 2021-04-20 01:15:07 +02:00
parent 1b25007e77
commit 909352589f
7 changed files with 7794 additions and 124 deletions

View File

@ -1,5 +1,3 @@
# For more information see: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: 'github-actions'

View File

@ -1,12 +1,10 @@
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: 'Divlo'
on:
push:
branches: [master]
branches: [master, development]
pull_request:
branches: [master]
branches: [master, development]
jobs:
ci:
@ -28,6 +26,7 @@ jobs:
path: '.npm'
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: 'npm install --global npm@7'
- run: 'npm ci --cache .npm --prefer-offline'
- run: 'npm run lint:commit -- --to "${{ github.sha }}"'
- run: 'npm run lint:docker'

34
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: 'release'
on:
workflow_run:
workflows: [ci]
branches: [master]
types:
- 'completed'
jobs:
release:
runs-on: 'ubuntu-latest'
strategy:
matrix:
node-version: [14.x]
steps:
- uses: 'actions/checkout@v2'
- name: Use Node.js ${{ matrix.node-version }}
uses: 'actions/setup-node@v2.1.5'
with:
node-version: ${{ matrix.node-version }}
- name: 'Cache dependencies'
uses: 'actions/cache@v2.1.5'
with:
path: '.npm'
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: 'npm install --global npm@7'
- run: 'npm ci --cache .npm --prefer-offline'
- run: 'npm run release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

12
.releaserc.json Normal file
View File

@ -0,0 +1,12 @@
{
"release": {
"branches": ["master"]
},
"plugins": [
["@semantic-release/commit-analyzer", {
"preset": "conventionalcommits"
}],
"@semantic-release/release-notes-generator",
"@semantic-release/github"
]
}

25
jest.config.js Normal file
View File

@ -0,0 +1,25 @@
module.exports = {
roots: ['<rootDir>'],
transform: {
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest'
},
moduleDirectories: ['node_modules', './'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
setupFilesAfterEnv: [
'@testing-library/jest-dom/extend-expect',
'@testing-library/react'
],
collectCoverage: true,
collectCoverageFrom: [
'**/*.{js,jsx,ts,tsx}',
'!**/*.d.ts',
'!**/.next/**',
'!**/node_modules/**',
'!**/next.config.js',
'!**/postcss.config.js',
'!**/workbox-*.js',
'!**/sw.js'
],
coverageDirectory: './coverage',
coverageReporters: ['text', 'cobertura']
}

7790
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,46 +1,10 @@
{
"name": "divlo",
"version": "0.0.0",
"version": "0.0.0-development",
"private": true,
"jest": {
"roots": [
"<rootDir>"
],
"transform": {
"^.+\\.(js|jsx|ts|tsx)$": "babel-jest"
},
"moduleDirectories": [
"node_modules",
"./"
],
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
],
"setupFilesAfterEnv": [
"@testing-library/jest-dom/extend-expect",
"@testing-library/react"
],
"collectCoverage": true,
"collectCoverageFrom": [
"**/*.{js,jsx,ts,tsx}",
"!**/*.d.ts",
"!**/.next/**",
"!**/node_modules/**",
"!**/next.config.js",
"!**/postcss.config.js",
"!**/workbox-*.js",
"!**/sw.js"
],
"coverageDirectory": "./coverage",
"coverageReporters": [
"text",
"cobertura"
]
"repository": {
"type": "git",
"url": "https://github.com/Divlo/Divlo"
},
"ts-standard": {
"ignore": [
@ -70,6 +34,7 @@
"lint:typescript": "ts-standard",
"lighthouse": "lhci autorun",
"test": "jest",
"release": "semantic-release",
"postinstall": "husky install"
},
"dependencies": {
@ -116,7 +81,8 @@
"markdownlint-cli": "0.27.1",
"node-mocks-http": "1.10.1",
"postcss": "8.2.10",
"sass": "1.32.10",
"sass": "1.32.11",
"semantic-release": "17.4.2",
"ts-standard": "10.0.0",
"typescript": "4.2.4"
}