Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/npmPublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish to npm

on:
workflow_dispatch:
inputs:
npm_tag:
description: "Release type latest"
required: true
default: "latest"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: "main"

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "14" # Use Node.js version 14
cache: "yarn"

- name: Install dependencies
working-directory: ./sdk
run: yarn install

- name: Get version from package.json
id: package_version
run: echo "PACKAGE_VERSION=$(jq -r '.version' ./sdk/package.json)" >> $GITHUB_ENV

- name: Use version
run: echo "SDK version is $PACKAGE_VERSION"

- name: Build
run: yarn generate:sdk

- name: Push to npm
working-directory: ./sdk
run: npm publish --tag ${{ github.event.inputs.npm_tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/engine",
"version": "0.0.5",
"version": "0.0.6",
"main": "dist/thirdweb-dev-engine.cjs.js",
"module": "dist/thirdweb-dev-engine.esm.js",
"files": [
Expand Down