diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39aa507..bb35c68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,5 +34,14 @@ jobs: - name: Run tests, coverage, create test report and badges run: deno task test - - name: Try to build npm package - run: deno task build + - name: Setup Node / NPM + uses: actions/setup-node@v4 + with: + node-version: '22.x' + registry-url: 'https://npm.pkg.github.com' + scope: '@continuit' + + - name: Dry run build npm package + run: deno task publish_npm_dry + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2d07023..9654ad4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,6 +11,7 @@ jobs: permissions: contents: read id-token: write + packages: write steps: - name: Setup repo diff --git a/deno.json b/deno.json index f67c966..7db1f51 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@continuit/testreport", - "version": "0.1.2", + "version": "0.1.3", "description": "Generates a test report and badges from your test and coverage results. Allows checking the report in your CI pipeline.", "keywords": [ "test", @@ -21,10 +21,11 @@ "test": "deno task test_prepare && deno test -RSW --coverage --clean --junit-path test_results/junit.xml && deno coverage --lcov --output=test_results/cov.lcov && deno coverage && deno run -RW ./src/mod.ts ./testreport.json", "test_prepare": "rm -rf test_output && mkdir -p test_output && mkdir -p test_output/deno_success && mkdir -p test_output/deno_disabled && mkdir -p test_output/deno_failed && mkdir -p test_output/jest && mkdir -p test_output/vitest && mkdir -p test_output/no_tests && mkdir -p test_output/invalid_input && mkdir -p test_output/invalid_output", "clean": "rm -rf test_output && rm -rf coverage", - "build": "deno run -A build.ts", - "all": "deno lint && deno fmt && deno check ./src/mod.ts && deno task test && deno task build && deno fmt", + "build": "deno run -A build.ts && deno fmt", + "all": "deno lint && deno fmt && deno check ./src/mod.ts && deno task test && deno task build", "publish_jsr": "deno publish", - "publish_npm": "deno task build && cd npm && npm publish --public" + "publish_npm": "deno task build && cd npm && npm publish --public", + "publish_npm_dry": "deno task build && cd npm && npm publish --dry-run" }, "imports": { "@continuit/xmlscanner": "jsr:@continuit/xmlscanner@^1.0.0",