From 434fe2ddaf40db13a0cd47bcbb597d61f62c864a Mon Sep 17 00:00:00 2001 From: Misha Holtz <36575242+mnholtz@users.noreply.github.com> Date: Wed, 20 Sep 2023 16:12:26 -0700 Subject: [PATCH] add npm publish gh action --- .github/workflows/npm-publish.yml | 29 +++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 30 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 0000000..6a7f916 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,29 @@ +name: Publish Package to npmjs +on: + release: + types: [published] +env: + EM_VERSION: 1.39.14 +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: mymindstorm/setup-emsdk@v11 + with: + version: ${{env.EM_VERSION}} + - uses: actions/checkout@v4 + with: + submodules: true + - name: Build jq-web + run: | + make + npm ci + - uses: actions/setup-node@v3 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 9e0020a..8855be7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ browserify-cache.json *.swo *.swp jq.* +.idea