Skip to content

Commit

Permalink
Document github ci
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Jan 26, 2025
1 parent 7a4a76f commit 20866cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 27 deletions.
33 changes: 6 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
6 changes: 6 additions & 0 deletions .github/workflows/test-js.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 20866cf

Please sign in to comment.