mirror of
https://github.com/DeBrosOfficial/network-ts-sdk.git
synced 2025-12-11 01:58:49 +00:00
Update package version to 0.1.0, rename package, and add npm and GitHub Packages publishing workflows
This commit is contained in:
parent
60e67c98bf
commit
03c62882fa
65
.github/workflows/publish-npm.yml
vendored
Normal file
65
.github/workflows/publish-npm.yml
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
name: Publish SDK to npm
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*' # Trigger on version tags (e.g., v0.1.0, v0.2.1)
|
||||
|
||||
jobs:
|
||||
publish-npm:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
working-directory: network-ts-sdk
|
||||
|
||||
- name: Build SDK
|
||||
run: pnpm build
|
||||
working-directory: network-ts-sdk
|
||||
|
||||
- name: Publish to npm
|
||||
run: npm publish --access public
|
||||
working-directory: network-ts-sdk
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
publish-github:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js for GitHub Packages
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
registry-url: 'https://npm.pkg.github.com'
|
||||
scope: '@network'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
working-directory: network-ts-sdk
|
||||
|
||||
- name: Build SDK
|
||||
run: pnpm build
|
||||
working-directory: network-ts-sdk
|
||||
|
||||
- name: Publish to GitHub Packages
|
||||
run: npm publish
|
||||
working-directory: network-ts-sdk
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@network/network-ts-sdk",
|
||||
"version": "0.0.2",
|
||||
"name": "network-ts-sdk",
|
||||
"version": "0.1.0",
|
||||
"description": "TypeScript SDK for DeBros Network Gateway",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
@ -27,7 +27,9 @@
|
||||
"typecheck": "tsc --noEmit",
|
||||
"lint": "eslint src tests",
|
||||
"test": "vitest",
|
||||
"test:e2e": "vitest run tests/e2e"
|
||||
"test:e2e": "vitest run tests/e2e",
|
||||
"release:npm": "npm publish --access public --registry=https://registry.npmjs.org/",
|
||||
"release:gh": "npm publish --registry=https://npm.pkg.github.com"
|
||||
},
|
||||
"dependencies": {
|
||||
"isomorphic-ws": "^5.0.0"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user