diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da79f4e9..e16a13f4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,33 +2,12 @@ name: Publish release on: release: types: [created] - workflow_dispatch: jobs: - publish-jsr: - name: Publish to JSR.io - runs-on: ubuntu-latest + release-js: + name: 'jsbt v0.3.1' # Should match commit below + uses: paulmillr/jsbt/.github/workflows/release.yml@c45f03360e0171b138f04568d2fdd35d7bbc0d35 + secrets: + NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} permissions: - contents: read + contents: write id-token: write - steps: - - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4 - - run: npm install -g jsr - - run: jsr publish - publish-npm: - name: Publish to NPM - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write - steps: - - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4 - - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4 - with: - node-version: 22 - registry-url: 'https://registry.npmjs.org' - cache: npm - - run: npm ci - - run: npm run build - - run: npm publish --provenance --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/.github/workflows/test-js.yml b/.github/workflows/test-js.yml index 9a0ccbcd..9ac738c5 100644 --- a/.github/workflows/test-js.yml +++ b/.github/workflows/test-js.yml @@ -1,5 +1,11 @@ name: Run JS tests +# 3 different jobs are not combined into 1. +# In theory, it could be less error-prone: +# 1. Chokidar does huge load of IO / FS. +# 2. Github CI use virtual machines which can reuse single physical machine. +# 3. If same physical machine has too much IO usage, we have more chance of bugs. + on: - push - pull_request