Skip to content

Commit 5419adb

Browse files
author
avram19
committed
fix: enabled auto publish
1 parent ff30ad2 commit 5419adb

File tree

7 files changed

+64
-6
lines changed

7 files changed

+64
-6
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: Publish
2+
3+
on:
4+
push:
5+
branches: [main, beta]
6+
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: 14.x
19+
- name: Install required plugins for semantic-release
20+
run: npm install --save-dev @semantic-release/changelog @semantic-release/git husky
21+
- name: Release
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
NPM_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
25+
run: npx semantic-release

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
package-lock.json
2-
node_modules
2+
node_modules
3+
.idea

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

commitlint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ["@commitlint/config-conventional"],
3+
};

lib/Cards/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Cards {
1919
* @param {Boolean} [rtl = false] works on v1.5 and later, when true content in this Adaptive Card should be presented right to left. defaults to false.
2020
* @param {Boolean} [isFullWidth = true] sets the card width to full size if true. defaults to true
2121
* @param {Array<object>} [entities = []] array of entities to be set inside msteams attribute
22-
* @returns {Attachment} adaptive card attachment
22+
* @returns {Attachment} adaptive card attachment
2323
*/
2424
adaptiveCard({
2525
version = "1.3",
@@ -87,7 +87,7 @@ class Cards {
8787
* @param {String} messageText text to be displayed.
8888
* @returns {Partial<Activity>} MessageFactory Text
8989
*/
90-
text(messageText) {
90+
text(messageText) {
9191
return MessageFactory.text(messageText);
9292
}
9393
}

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
2-
"name": "teams-view-builder",
3-
"version": "0.0.1",
2+
"name": "@springrole/teams-view-builder",
3+
"version": "0.0.0-semantic-release",
44
"description": "Teams view builder containing re-usable blocks to be used on any ms-teams app",
55
"main": "./lib",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"prepare": "husky install"
89
},
910
"repository": {
1011
"type": "git",
@@ -17,8 +18,14 @@
1718
},
1819
"homepage": "https://github.com/SpringRole/teams-view-builder#readme",
1920
"dependencies": {
21+
"@commitlint/cli": "^16.2.3",
22+
"@commitlint/config-conventional": "^16.2.1",
2023
"botbuilder": "^4.11.1",
2124
"lodash.isempty": "^4.4.0",
2225
"node-emoji": "^1.11.0"
26+
},
27+
"devDependencies": {
28+
"husky": "^7.0.4",
29+
"prettier": "^2.6.2"
2330
}
2431
}

release.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
branches: ["main"],
3+
plugins: [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
["@semantic-release/changelog", { changelogFile: "CHANGELOG.md" }],
7+
"@semantic-release/npm",
8+
"@semantic-release/github",
9+
[
10+
"@semantic-release/git",
11+
{
12+
assets: ["CHANGELOG.md", "dist/**"],
13+
message:
14+
"chore(release): set `package.json` to ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
15+
},
16+
],
17+
],
18+
};

0 commit comments

Comments
 (0)