Skip to content

Commit

Permalink
ci: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Jan 17, 2025
1 parent cae80f9 commit 030050f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 51 deletions.
54 changes: 5 additions & 49 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,12 @@ name: Publish release
on:
release:
types: [created]
workflow_dispatch:
jobs:
publish-jsr:
name: Publish to JSR.io
runs-on: ubuntu-latest
permissions:
contents: read
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 }}
standalone:
name: Upload files to GitHub Releases
runs-on: ubuntu-latest
test-js:
name: 'JS v0.2.2' # v0.2.2 == commit below
uses: paulmillr/jsbt/.github/workflows/release.yml@8db14713888c4c7dc1b031d480213cd67f5c422d
secrets:
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
permissions:
contents: write
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: |
cd build
npm ci
npm run build:release
cd ..
- run: gh release upload ${{ github.event.release.tag_name }} build/`npx jsbt outfile`
env:
GH_TOKEN: ${{ github.token }}
4 changes: 3 additions & 1 deletion .github/workflows/test-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ on:
jobs:
test-js:
name: 'JS v0.2.2' # v0.2.2 == commit below
uses: paulmillr/jsbt/.github/workflows/test-js.yml@986dbfea9667eeb0e81bf606cbe9ed169fea89b2
uses: paulmillr/jsbt/.github/workflows/test-js.yml@698d27bde26a862e1e0d21354ee0d72174539181
with:
clone-submodules: true
2 changes: 1 addition & 1 deletion test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ export function jsonGZ(path) {
const vectorPath = joinPath(_dirname, 'vectors', 'boofcv-v3');
export const DETECTION_PATH = joinPath(vectorPath, 'detection');
export function readJPEG(path) {
console.log('readJPEG', vectorPath, path);
// console.log('readJPEG', vectorPath, path);
return jpegDecode(readFileSync(joinPath(vectorPath, path)));
}

0 comments on commit 030050f

Please # to comment.