1
0
mirror of https://github.com/kremalicious/blowfish.git synced 2024-11-15 09:35:14 +01:00

Merge pull request #15 from kremalicious/feature/releases

release process with release-it
This commit is contained in:
Matthias Kretschmann 2019-05-28 02:21:20 +02:00 committed by GitHub
commit a76483c809
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 72 additions and 4 deletions

View File

@ -1,6 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2017 Matthias Kretschmann Copyright (c) 2019 Matthias Kretschmann
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -28,6 +28,7 @@
- [Development](#development) - [Development](#development)
- [Configuration](#configuration) - [Configuration](#configuration)
- [Build packages](#build-packages) - [Build packages](#build-packages)
- [Creating Releases](#creating-releases)
- [License](#license) - [License](#license)
--- ---
@ -100,6 +101,46 @@ On a Mac and Linux machine, packaging requires [`wine`](https://www.winehq.org)
brew install wine rpm brew install wine rpm
``` ```
## Creating Releases
From a clean `master` branch, running any release task will do the following:
- bumps the project version
- creates a Git tag
- commits and pushes everything
- creates a GitHub release with commit messages as description
- adds freshly build binaries for macOS, Windows & Linux as assets to each GitHub release
You can execute the script using {major|minor|patch} as first argument to bump the version accordingly:
- To bump a patch version: `npm run release`
- To bump a minor version: `npm run release minor`
- To bump a major version: `npm run release major`
For the GitHub releases steps a GitHub personal access token, exported as `GITHUB_TOKEN` is required. [Setup](https://github.com/release-it/release-it#github-releases)
## License ## License
[The MIT License](./LICENSE) ```text
The MIT License (MIT)
Copyright (c) 2019 Matthias Kretschmann
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
```

View File

@ -9,7 +9,8 @@
"start": "webpack-dev-server --hot --host 0.0.0.0 --config=./webpack.dev.config.js", "start": "webpack-dev-server --hot --host 0.0.0.0 --config=./webpack.dev.config.js",
"build": "webpack --mode production --config webpack.common.config.js", "build": "webpack --mode production --config webpack.common.config.js",
"package": "electron-builder build -mwl && open ./dist", "package": "electron-builder build -mwl && open ./dist",
"dist": "npm run build && npm run package" "dist": "npm run build && npm run package",
"release": "release-it --non-interactive"
}, },
"repository": "https://github.com/kremalicious/blowfish.git", "repository": "https://github.com/kremalicious/blowfish.git",
"homepage": "https://github.com/kremalicious/blowfish", "homepage": "https://github.com/kremalicious/blowfish",
@ -52,6 +53,7 @@
"react-blockies": "^1.4.1", "react-blockies": "^1.4.1",
"react-dom": "^16.8.6", "react-dom": "^16.8.6",
"react-pose": "^4.0.8", "react-pose": "^4.0.8",
"release-it": "^12.2.1",
"style-loader": "^0.23.1", "style-loader": "^0.23.1",
"stylelint": "^10.0.1", "stylelint": "^10.0.1",
"stylelint-config-standard": "^18.3.0", "stylelint-config-standard": "^18.3.0",
@ -80,5 +82,30 @@
], ],
"category": "Office" "category": "Office"
} }
},
"release-it": {
"scripts": {
"beforeStart": "npm test",
"afterBump": "npm run dist",
"afterRelease": "echo Successfully released ${name} v${version} to ${repo.repository}."
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true,
"assets": [
"dist/*${version}*.exe",
"dist/*${version}-mac.zip",
"dist/*${version}.dmg",
"dist/*${version}.AppImage",
"dist/*${version}*.deb",
"dist/*${version}*.snap",
"dist/*${version}*.rpm"
]
},
"npm": {
"publish": false
}
} }
} }