From 4fbfa7b4aff52eaa4dff6077ce4e3660c493f934 Mon Sep 17 00:00:00 2001 From: Amin Moghaddam Date: Tue, 29 Oct 2024 17:22:14 +0100 Subject: [PATCH] feat: js sdk publish workflow (#196) * feat: add workflow for publishing the js sdk * bump: bump js package for testing --- .github/workflows/publish-js-sdks.yml | 35 +++++++++++++++++++ .../workflows/pypi-express-relay-utils.yml | 3 +- sdk/js/package-lock.json | 4 +-- sdk/js/package.json | 2 +- 4 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/publish-js-sdks.yml diff --git a/.github/workflows/publish-js-sdks.yml b/.github/workflows/publish-js-sdks.yml new file mode 100644 index 00000000..bbeaf703 --- /dev/null +++ b/.github/workflows/publish-js-sdks.yml @@ -0,0 +1,35 @@ +name: Publish Express Relay JS packages + +on: + push: + tags: + - "js-v*" +jobs: + publish-js: + name: Publish Javascript SDK Package to NPM + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - uses: actions/setup-node@v4 + with: + node-version-file: "package.json" + + - name: Install dependencies + run: npm install + working-directory: sdk/js/ + + - name: Run tests + run: npm test # Ensure your tests pass before publishing + working-directory: sdk/js/ + + - name: Build package + run: npm run build # If your package requires a build step + working-directory: sdk/js/ + + - name: Publish to npm + run: npm publish + working-directory: sdk/js/ + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/pypi-express-relay-utils.yml b/.github/workflows/pypi-express-relay-utils.yml index a6000703..9afea5c9 100644 --- a/.github/workflows/pypi-express-relay-utils.yml +++ b/.github/workflows/pypi-express-relay-utils.yml @@ -9,7 +9,8 @@ env: PYTHON_VERSION: "3.11" jobs: - deploy: + publish-python: + name: Publish Python SDK Package to PyPI runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 diff --git a/sdk/js/package-lock.json b/sdk/js/package-lock.json index 732b9c62..2456ac7c 100644 --- a/sdk/js/package-lock.json +++ b/sdk/js/package-lock.json @@ -1,12 +1,12 @@ { "name": "@pythnetwork/express-relay-js", - "version": "0.12.2", + "version": "0.12.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@pythnetwork/express-relay-js", - "version": "0.12.2", + "version": "0.12.3", "license": "Apache-2.0", "dependencies": { "@coral-xyz/anchor": "^0.30.1", diff --git a/sdk/js/package.json b/sdk/js/package.json index 12e02046..05386c1f 100644 --- a/sdk/js/package.json +++ b/sdk/js/package.json @@ -1,6 +1,6 @@ { "name": "@pythnetwork/express-relay-js", - "version": "0.12.2", + "version": "0.12.3", "description": "Utilities for interacting with the express relay protocol", "homepage": "https://github.com/pyth-network/per/tree/main/sdk/js", "author": "Douro Labs",