55 lines
1.4 KiB
YAML
Raw Normal View History

2023-05-04 22:05:12 +05:30
name: Publish to npm
on:
push:
tags:
2023-05-05 00:48:16 +05:30
- "sdk-v**"
2023-05-04 22:05:12 +05:30
jobs:
npm:
name: Publish to npm
runs-on: ubuntu-latest
2023-05-05 01:32:18 +05:30
strategy:
matrix:
node-version: [18.1.0]
2023-05-04 22:05:12 +05:30
steps:
- name: 🧮 Checkout code
uses: actions/checkout@v3
2023-05-05 01:40:02 +05:30
- name: Install tools
uses: actions/setup-node@v2
with:
2024-06-18 20:07:15 +05:30
node-version: ${{ matrix.node-version }}
2023-05-05 01:40:02 +05:30
2023-05-04 22:05:12 +05:30
- name: 🔧 Yarn cache
uses: actions/setup-node@v3
with:
cache: "yarn"
registry-url: "https://registry.npmjs.org"
- name: 🔨 Install dependencies
run: "yarn install --prefer-offline --frozen-lockfile"
- name: Run Unit tests
run: "yarn test"
- name: Run Lint Checks
2024-06-18 20:07:15 +05:30
run: "yarn run lint-ci"
2023-05-04 22:05:12 +05:30
- name: Run Typescript Checks
2024-06-18 20:07:15 +05:30
run: "yarn run tsc"
2023-05-04 22:05:12 +05:30
- name: Run SDK tests
2024-06-18 20:07:15 +05:30
run: "yarn test:sdk"
2023-05-04 22:05:12 +05:30
- name: Build SDK
2024-06-18 20:07:15 +05:30
run: "yarn build:sdk"
2023-05-04 22:05:12 +05:30
- name: 🚀 Publish to npm
id: npm-publish
uses: JS-DevTools/npm-publish@v2
with:
2024-06-18 20:07:15 +05:30
token: ${{ secrets.HYDROGEN_NPM_TOKEN }}
2023-05-04 22:05:12 +05:30
access: public
package: ./target