Skip to content

v0.7.50

v0.7.50 #1

name: test sdk install
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js 20
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install and build the SDK with npm
run: |
npm install
npm run build
- name: Pack the SDK
run: |
npm pack
working-directory: mods/sdk
- name: Upload SDK tarball
uses: actions/upload-artifact@v4
with:
name: sdk-tarball
path: mods/sdk/fonoster-sdk-*.tgz
install-with-yarn:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
node-version: [18, 20, 21, 22]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Yarn
run: npm install -g yarn
- name: Download SDK tarball
uses: actions/download-artifact@v4
with:
name: sdk-tarball
- name: Install the SDK with yarn
run: |
mkdir new_project
cd new_project
yarn init -y
yarn add ../fonoster-sdk-*.tgz
install-with-npm:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
node-version: [18, 20, 21, 22]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Download SDK tarball
uses: actions/download-artifact@v4
with:
name: sdk-tarball
- name: Install the SDK with npm
run: |
mkdir new_project
cd new_project
npm init -y
npm install ../fonoster-sdk-*.tgz