Skip to content

Added GH Workflow to publish to NPM #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
42 changes: 42 additions & 0 deletions .github/workflows/npmPublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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
run: yarn install

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

- name: Use version
run: echo "The version from package.json is $PACKAGE_VERSION"

- name: Build
run: yarn build

- name: Push to npm
run: npm publish ./dist --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
Loading