Skip to content

Commit b837650

Browse files
authored
Merge pull request #224 from bfabio/release
chore: add release-it to automatically do release chores
2 parents 04e7a71 + b2cd1aa commit b837650

5 files changed

Lines changed: 2211 additions & 48 deletions

File tree

.github/workflows/publiccode-versioning.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
push:
3+
tags:
4+
- 'v*'
5+
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
# Always release the tip of the default branch
14+
ref: master
15+
16+
- name: git config
17+
run: |
18+
git config user.name "${GITHUB_ACTOR}"
19+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
20+
21+
- run: yarn install
22+
- run: yarn run release --ci --no-increment
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.release-it.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"git": {
3+
"commitMessage": "chore(release): release ${version}",
4+
"tag": false
5+
},
6+
"github": {
7+
"release": true,
8+
"update": true
9+
},
10+
"npm": {
11+
"publish": false,
12+
"ignoreVersion": true
13+
},
14+
"plugins": {
15+
"@release-it/bumper": {
16+
"out": [
17+
"package.json",
18+
{
19+
"file": "publiccode.yml",
20+
"path": "softwareVersion"
21+
}
22+
]
23+
},
24+
"@release-it/conventional-changelog": {
25+
"preset": "conventionalcommits",
26+
"infile": "CHANGELOG.md"
27+
}
28+
}
29+
}

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"build-prod": "webpack --config webpack.config.prod.js",
1111
"test": "jest",
1212
"deploy": "gh-pages -u 'Deploy Bot <no-reply@teamdigitale.governo.it>' -d dist",
13-
"postinstall": "patch-package"
13+
"postinstall": "patch-package",
14+
"release": "release-it"
1415
},
1516
"keywords": [
1617
"publiccode",
@@ -29,6 +30,8 @@
2930
}
3031
},
3132
"devDependencies": {
33+
"@release-it/bumper": "^3.0.1",
34+
"@release-it/conventional-changelog": "^3.3.0",
3235
"autoprefixer": "^9.4.10",
3336
"babel-core": "^6.26.3",
3437
"babel-eslint": "^10.0.1",
@@ -60,6 +63,7 @@
6063
"patch-package": "^6.2.2",
6164
"postcss-loader": "^3.0.0",
6265
"react-test-renderer": "^16.8.6",
66+
"release-it": "^14.11.5",
6367
"sass-loader": "^7.1.0",
6468
"style-loader": "^0.23.1",
6569
"url-loader": "^1.1.2",

0 commit comments

Comments
 (0)