From 5b69f7950d238fdfdbba3da169e419b2ad73c3a5 Mon Sep 17 00:00:00 2001 From: Illia Likhoshva Date: Fri, 20 Dec 2024 11:44:19 +0200 Subject: [PATCH] Add publish WF --- .github/workflows/npm_publish.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/npm_publish.yml diff --git a/.github/workflows/npm_publish.yml b/.github/workflows/npm_publish.yml new file mode 100644 index 00000000..a55a97bf --- /dev/null +++ b/.github/workflows/npm_publish.yml @@ -0,0 +1,28 @@ +name: Publish Package to npmjs +on: + workflow_dispatch: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v4 + - name: Set up node + uses: actions/setup-node@v4 + with: + node-version: lts/* + check-latest: true + registry-url: 'https://registry.npmjs.org' + scope: '@airdao' + cache: 'yarn' + - name: Install dependencies + run: yarn install --frozen-lockfile + - run: yarn compile + - run: yarn publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}