Skip to content

Commit 22fce22

Browse files
committed
chore(workflow): release
1 parent 8413f5f commit 22fce22

File tree

3 files changed

+44
-16
lines changed

3 files changed

+44
-16
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
# This is a basic workflow to help you get started with Actions
1+
name: CI Code Quality Workflow
22

3-
name: CI
4-
5-
# Controls when the workflow will run
63
on:
74
push:
85
branches: [ master ]
9-
# pull_request:
10-
# branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
118

129
# Allows you to run this workflow manually from the Actions tab
1310
workflow_dispatch:
1411

1512
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1613
jobs:
17-
publishgpr:
14+
validate:
1815
# The type of runner that the job will run on
1916
runs-on: ubuntu-latest
2017

@@ -24,21 +21,14 @@ jobs:
2421
- uses: actions/checkout@v2
2522
- uses: actions/setup-node@v2
2623
with:
27-
node-version: '16'
24+
node-version: 14
2825
- run: npm install
2926

30-
- name: Validate TS
27+
- name: Lint TS
3128
run: npm run lint
3229

3330
- name: Test TS
3431
run: npm test
3532

3633
- name: TS to JS
3734
run: npm run build
38-
39-
- uses: actions/setup-node@v2
40-
with:
41-
registry-url: 'https://npm.pkg.github.com'
42-
- run: npm publish
43-
env:
44-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-package.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI Release workflow
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: 14
15+
- run: npm ci
16+
- run: npm lint
17+
- run: npm test
18+
- run: npm build
19+
20+
publish-gpr:
21+
needs: build
22+
runs-on: ubuntu-latest
23+
permissions:
24+
packages: write
25+
contents: read
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: actions/setup-node@v2
29+
with:
30+
node-version: 14
31+
registry-url: https://npm.pkg.github.com/
32+
- run: npm ci
33+
- run: npm publish
34+
env:
35+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"files": [
1515
"lib/**/*"
1616
],
17+
"publishConfig": {
18+
"IvanRave:registry": "https://npm.pkg.github.com"
19+
},
1720
"scripts": {
1821
"build": "tsc",
1922
"test": "jest",

0 commit comments

Comments
 (0)