From 94d918be86f285ba0586a9dcc20d2c5f9a7e457c Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sun, 10 Oct 2021 11:29:18 -0400 Subject: [PATCH] chore: always run npm build for testing purposes --- .github/workflows/ci.yml | 4 ++-- scripts/build_npm.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8eb5b3..9db3217 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,15 +13,15 @@ jobs: id: get_tag_version run: echo ::set-output name=TAG_VERSION::${GITHUB_REF/refs\/tags\//} - uses: actions/setup-node@v2 - if: startsWith(github.ref, 'refs/tags/') with: node-version: '14.x' registry-url: 'https://registry.npmjs.org' + - name: npm build + run: deno run --allow-read --allow-write=./npm --allow-net --allow-run --no-check ./scripts/build_npm.ts ${{steps.get_tag_version.outputs.TAG_VERSION}} - name: npm publish if: startsWith(github.ref, 'refs/tags/') env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | - deno run --allow-read --allow-write=./npm --allow-net --allow-run --no-check ./scripts/build_npm.ts ${{steps.get_tag_version.outputs.TAG_VERSION}} cd npm npm publish --access public diff --git a/scripts/build_npm.ts b/scripts/build_npm.ts index 32febc2..6757b16 100644 --- a/scripts/build_npm.ts +++ b/scripts/build_npm.ts @@ -6,7 +6,7 @@ await build({ outDir: "./npm", package: { name: "@dprint/formatter", - version: Deno.args[0], + version: Deno.args[0] ?? "0.0.0", description: "Wasm formatter for dprint plugins.", repository: { type: "git",