Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
chore(build): use semantic release to publish the new versions (#426)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudbesnier authored May 11, 2020
1 parent a6217a0 commit 64dbf87
Show file tree
Hide file tree
Showing 10 changed files with 3,444 additions and 102 deletions.
2 changes: 0 additions & 2 deletions .env.example

This file was deleted.

1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## Pull Request checklist:

- [ ] Write an explicit title for the Pull Request, following [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/#summary)
- [ ] Write changes made in the CHANGELOG.md
- [ ] Create automatic tests
- [ ] No automatic tests failures
- [ ] Test manually the implemented changes
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.DS_Store
.env
coverage/
node_modules/
test-output/
2 changes: 0 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
assets
.env
.env-example
.github
.githooks
.eslint-bin
46 changes: 46 additions & 0 deletions .releaserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
module.exports = {
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
'@semantic-release/changelog',
'@semantic-release/npm',
'@semantic-release/git',
'@semantic-release/github',
[
'semantic-release-slack-bot',
{
markdownReleaseNotes: true,
notifyOnSuccess: true,
notifyOnFail: false,
onSuccessTemplate: {
text: "👾 $package_name@$npm_package_version has been released!",
blocks: [{
type: 'section',
text: {
type: 'mrkdwn',
text: '*New `$package_name` package released!*'
}
}, {
type: 'context',
elements: [{
type: 'mrkdwn',
text: "👾 *Version:* <$repo_url/releases/tag/v$npm_package_version|$npm_package_version>"
}]
}, {
type: 'divider',
}],
attachments: [{
blocks: [{
type: 'section',
text: {
type: 'mrkdwn',
text: '*Changes* of version $release_notes',
},
}],
}],
},
packageName: 'lumber-cli',
}
],
],
}
40 changes: 25 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
language: node_js
node_js:
- lts/*
- 10

env:
- NODE_ENV=travis
node_js: lts/*

services:
- docker --privileged
- docker

before_install:
- docker-compose --version
- docker-compose up -d
- docker ps

install:
- yarn install
stages:
- Lint & Tests
- Build & Publish

script:
- commitlint-travis
- yarn lint
- sleep 15; yarn test
jobs:
include:
- stage: Lint & Tests
name: Lint commit messages
script: commitlint-travis
- script: yarn lint
name: Lint JavaScript
- script: sleep 15; yarn test
name: Tests (Node 10)
node_js: 10
- script: sleep 15; yarn test
name: Tests (Node LTS)
- stage: Build & Publish
if: branch = master
script: skip
deploy:
provider: script
on:
branch: master
script: yarn && npx semantic-release
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![npm package](https://badge.fury.io/js/lumber-cli.svg)](https://badge.fury.io/js/lumber-cli)
[![Build Status](https://travis-ci.org/ForestAdmin/lumber.svg?branch=devel)](https://travis-ci.org/ForestAdmin/lumber)
![Coverage](https://img.shields.io/badge/coverage-81%25%0A-critical)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

<p align="center">
<img src="https://github.com/ForestAdmin/lumber/blob/master/assets/lumber-logo.png?raw=true" alt="Lumber logo">
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"scripts": {
"lint": "./node_modules/eslint/bin/eslint.js ./*.js .eslint-bin deserializers scripts serializers services test utils",
"readme:update-coverage": "yarn test:coverage && node ./scripts/update-coverage.js",
"release": "node ./scripts/release.js",
"test": "jest --runInBand",
"test:coverage": "jest --runInBand --coverage --forceExit"
},
Expand Down Expand Up @@ -51,6 +50,8 @@
"@commitlint/config-conventional": "8.3.4",
"@commitlint/travis-cli": "8.3.5",
"@forestadmin/devops": "2.0.1",
"@semantic-release/changelog": "5.0.1",
"@semantic-release/git": "9.0.0",
"eslint": "6.7.2",
"eslint-config-airbnb-base": "14.0.0",
"eslint-plugin-import": "2.18.2",
Expand All @@ -60,6 +61,8 @@
"husky": "4.2.3",
"jest": "24.9.0",
"rimraf": "3.0.0",
"semantic-release": "17.0.7",
"semantic-release-slack-bot": "1.6.2",
"simple-git": "1.126.0",
"sinon": "7.5.0"
}
Expand Down
8 changes: 0 additions & 8 deletions scripts/release.js

This file was deleted.

Loading

0 comments on commit 64dbf87

Please sign in to comment.