Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"branch": "master",
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"releaseRules": [
{
"type": "refactor",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "test",
"release": "patch"
},
{
"type": "style",
"release": "patch"
},
{
"type": "perf",
"release": "patch"
},
{
"type": "ci",
"release": "patch"
},
{
"type": "build",
"release": "patch"
},
{
"type": "chore",
"scope": "deps",
"release": "patch"
},
{
"type": "chore",
"scope": "deps-dev",
"release": "patch"
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": ":sparkles: Novidades",
"hidden": false
},
{
"type": "fix",
"section": ":bug: Correções",
"hidden": false
},
{
"type": "docs",
"section": ":memo: Documentação",
"hidden": false
},
{
"type": "style",
"section": ":barber: Estilização",
"hidden": false
},
{
"type": "refactor",
"section": ":zap: Refatoração",
"hidden": false
},
{
"type": "perf",
"section": ":fast_forward: Desempenho",
"hidden": false
},
{
"type": "test",
"section": ":white_check_mark: Testes",
"hidden": false
},
{
"type": "ci",
"section": ":repeat: CI",
"hidden": false
},
{
"type": "chore",
"section": ":package: Atualizações",
"hidden": false
}
]
}
}
],
[
"@semantic-release/github",
{
"assets": [
{
"path": "server.zip",
"label": "DeltaWeb - Build: ${nextRelease.gitTag}",
"name": "server-${nextRelease.gitTag}.zip"
}
]
}
]
]
}
version: 2
defaults: &defaults
working_directory: ~/workspace
docker:
- image: circleci/node:10.15.0
jobs:
prepare_build_release:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- v2-dependencies-{{ checksum "package.json" }}
- v2-dependencies-
- run:
name: Prepare Workspace
command: |
sudo apt-get update
sudo apt-get install zip ca-certificates rsync -y
- run:
name: Install dependencies
command: |
yarn
- save_cache:
paths:
- node_modules
key: v2-dependencies-{{ checksum "package.json" }}
- run:
name: Build typescript
command: yarn build
- run:
name: Remove devDependencies for zip build
command: yarn install --production --ignore-scripts --prefer-offline
- run:
name: Zip Build
command: |
mv node_modules ./build
cp ./.env ./build/.env
cd ./build
zip -q -r server.zip ./
mv ./server.zip ..
cd ..
- run:
name: Install deps for semantic-release
command: yarn
- run:
name: Generate release notes
command: yarn semantic-release
workflows:
version: 2
build:
jobs:
- prepare_build_release:
filters:
branches:
only: master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment