Skip to content

Commit 590f7e3

Browse files
authored
Merge pull request #19 from Contentstack-Solutions/fix/added-release-workflow
Create release.yml
2 parents e46498f + ef6cc0a commit 590f7e3

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
build:
8+
name: Build and upload
9+
runs-on: ubuntu-latest
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: 16
19+
- name: Install dependencies
20+
run: npm install
21+
- name: Build
22+
run: npm run prepack
23+
- name: Upload dist
24+
uses: actions/upload-artifact@v3
25+
with:
26+
name: lib
27+
path: lib
28+
29+
release:
30+
name: Download dist and release
31+
runs-on: ubuntu-latest
32+
needs: build
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v2
36+
with:
37+
fetch-depth: 0
38+
- name: Setup Node.js
39+
uses: actions/setup-node@v1
40+
with:
41+
node-version: 16
42+
- name: Install dependencies
43+
run: npm install
44+
- name: Download dist
45+
uses: actions/download-artifact@v3
46+
with:
47+
name: lib
48+
path: lib
49+
- name: Display dirs
50+
run: ls -R
51+
- name: Release
52+
uses: JS-DevTools/npm-publish@v1
53+
with:
54+
token: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)