Skip to content

Commit e6912ed

Browse files
authored
feat(close #12): add github workflows to template (#13)
1 parent 07292e7 commit e6912ed

File tree

4 files changed

+84
-0
lines changed

4 files changed

+84
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929
<img src="banner.png">
3030
</div>
3131

32+
## Features
33+
34+
- [x] Rollupjs packaging system with TypeScript by default
35+
- [x] Tslint support
36+
- [x] Husky hooks support
37+
- [x] Conventional release by **standard-version**
38+
- [x] GitHub actions (build, create github release, publish to npm)
39+
3240
## Installation
3341

3442
Make sure `yeoman` is installed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: create-github-release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
8+
jobs:
9+
create-github-release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/create-release@v1
14+
env:
15+
# This token is provided by Actions, you do not need to create your own token
16+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
17+
with:
18+
tag_name: ${{github.ref}}
19+
release_name: Release ${{github.ref}}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: main
2+
3+
on: push
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-node@v1
11+
with:
12+
node-version: 12
13+
registry-url: https://registry.npmjs.org
14+
- name: Install dependencies
15+
run: yarn
16+
- name: Analyze source
17+
run: yarn lint
18+
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: actions/setup-node@v1
24+
with:
25+
node-version: 12
26+
registry-url: https://registry.npmjs.org
27+
- name: Install dependencies
28+
run: yarn
29+
- name: Build source
30+
run: yarn build
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: publish-npm
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
8+
jobs:
9+
publish-npm:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: 12
16+
registry-url: https://registry.npmjs.org
17+
- name: Install dependencies
18+
run: yarn
19+
- name: Analyze source
20+
run: yarn lint
21+
- name: Build source
22+
run: yarn build
23+
- name: Publish package
24+
run: yarn publish --access public
25+
env:
26+
# Create your own token at https://github.com/organization/repository/settings/secrets
27+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)