Skip to content

Commit 914153a

Browse files
updating workflow
1 parent 5aca2bb commit 914153a

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish Epicurus Package
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 20
19+
cache: 'npm'
20+
21+
- name: Authenticate to Github Package Registry
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.PKG_TOKEN }}
24+
run: |
25+
echo "@contentstack:registry=https://npm.pkg.github.com" >> ~/.npmrc
26+
echo "//npm.pkg.github.com/:_authToken=${ NODE_AUTH_TOKEN}" > ~/.npmrc
27+
28+
- name: Install dependencies
29+
run: npm install
30+
31+
- name: Build the package
32+
run: npm run compile
33+
34+
- name: Publish to Github Package Registry
35+
env:
36+
NODE_AUTH_TOKEN: ${{ secrets.PKG_TOKEN }}
37+
run: |
38+
echo "Publishing Epicurus package to GitHub Package Registry..."
39+
npm publish --registry=https://npm.pkg.github.com

0 commit comments

Comments
 (0)