Skip to content

Commit b7df8ed

Browse files
authored
chore(release): Automated release using semantic-release. (#1503)
1 parent 3c05a88 commit b7df8ed

File tree

3 files changed

+93
-0
lines changed

3 files changed

+93
-0
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release
2+
on:
3+
push:
4+
branches: [main, development]
5+
6+
jobs:
7+
release:
8+
name: Release
9+
runs-on: ubuntu-18.04
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: 12
19+
- name: Install dependencies
20+
run: npm install @semantic-release/changelog @semantic-release/git @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/exec @semantic-release/git semantic-release/release-notes-generator
21+
- name: Release
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
25+
run: npx semantic-release

.releaserc

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"branches": ["+([0-9])?(.{+([0-9]),x}).x", "main", "next"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
[
7+
"@semantic-release/changelog",
8+
{
9+
"changelogFile": "CHANGELOG.md",
10+
"changelogTitle": "# Semantic Versioning Changelog"
11+
}
12+
],
13+
[
14+
"@semantic-release/npm",
15+
{
16+
"npmPublish": false,
17+
"tarballDir": "dist"
18+
}
19+
],
20+
[
21+
"@semantic-release/exec",
22+
{
23+
"prepareCmd": "./prepare-release.sh ${nextRelease.version}"
24+
}
25+
],
26+
[
27+
"@semantic-release/git",
28+
{
29+
"assets": [
30+
"CHANGELOG.md"
31+
]
32+
}
33+
],
34+
[
35+
"@semantic-release/github",
36+
{
37+
"assets": [
38+
{
39+
"path": "dist/**"
40+
}
41+
]
42+
}
43+
]
44+
]
45+
}

package.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "gossamer",
3+
"version": "1.0.0",
4+
"description": "<div align=\"center\"> <img alt=\"Gossamer logo\" src=\"/docs/assets/img/gossamer_banner.png\" width=\"600\" /> </div> <div align=\"center\"> <a href=\"https://www.gnu.org/licenses/gpl-3.0\"> <img alt=\"License: GPL v3\" src=\"https://img.shields.io/badge/License-GPLv3-blue.svg?style=for-the-badge&label=License\" height=\"20\"/> </a> <a href=\"https://github.com/ChainSafe/gossamer/actions\"> <img alt=\"build status\" src=\"https://img.shields.io/github/workflow/status/ChainSafe/gossamer/build?branch=development&style=for-the-badge&logo=github&label=build\" height=\"20\"/> </a> <a href=\"https://godoc.org/github.com/ChainSafe/gossamer\"> <img alt=\"go doc\" src=\"http://img.shields.io/badge/godoc-reference-5272B4.svg?style=for-the-badge\" height=\"20\" /> </a> <a href=\"https://goreportcard.com/report/github.com/ChainSafe/gossamer\"> <img alt=\"go report card\" src=\"https://goreportcard.com/badge/github.com/ChainSafe/gossamer?style=for-the-badge\" height=\"20\" /> </a> </div> <div align=\"center\"> <a href=\"https://app.codecov.io/gh/ChainSafe/gossamer\"> <img alt=\"Test Coverage\" src=\"https://img.shields.io/codecov/c/github/ChainSafe/gossamer/development?style=for-the-badge\" height=\"20\" /> </a> <a href=\"https://discord.gg/zy8eRF7FG2\"> <img alt=\"Discord\" src=\"https://img.shields.io/discord/593655374469660673.svg?style=for-the-badge&label=Discord&logo=discord\" height=\"20\"/> </a> <a href=\"https://medium.com/chainsafe-systems/tagged/polkadot\"> <img alt=\"Gossamer Blog\" src=\"https://img.shields.io/badge/Medium-grey?style=for-the-badge&logo=medium\" height=\"20\" /> </a> <a href=\"https://medium.com/chainsafe-systems/tagged/polkadot\"> <img alt=\"Twitter\" src=\"https://img.shields.io/twitter/follow/chainsafeth?color=blue&label=follow&logo=twitter&style=for-the-badge\" height=\"20\"/> </a> </div> <br />",
5+
"main": "index.js",
6+
"publishConfig": {
7+
"access": "public"
8+
},
9+
"release": {
10+
"branches": [
11+
"development",
12+
"next"
13+
]
14+
},
15+
"repository": {
16+
"type": "git",
17+
"url": "git+https://github.com/ChainSafe/gossamer.git"
18+
},
19+
"bugs": {
20+
"url": "https://github.com/ChainSafe/gossamer/issues"
21+
},
22+
"homepage": "https://github.com/ChainSafe/gossamer"
23+
}

0 commit comments

Comments
 (0)