From c663b6dd82db48bce42c3672f8d179633685d4a4 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Sat, 18 Jan 2025 01:54:03 +0000 Subject: [PATCH] Bump jsbt helpers 0.3.0. Add build:release script. --- .github/workflows/release.yml | 56 +++++------------------------------ .github/workflows/test-js.yml | 4 +-- 2 files changed, 9 insertions(+), 51 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2bf740a..e0bfc56 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,56 +2,14 @@ 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: 'jsbt v0.3.0' # Should match commit below + uses: paulmillr/jsbt/.github/workflows/test-js.yml@973650a225c0344aa5f993a6cd63835a262077e9 + with: + build-path: test/build + 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 }} diff --git a/.github/workflows/test-js.yml b/.github/workflows/test-js.yml index 0b24496..963e5b9 100644 --- a/.github/workflows/test-js.yml +++ b/.github/workflows/test-js.yml @@ -4,5 +4,5 @@ on: - pull_request jobs: test-js: - name: 'JS v0.2.2' # v0.2.2 == commit below - uses: paulmillr/jsbt/.github/workflows/test-js.yml@986dbfea9667eeb0e81bf606cbe9ed169fea89b2 + name: 'jsbt v0.3.0' # Should match commit below + uses: paulmillr/jsbt/.github/workflows/test-js.yml@973650a225c0344aa5f993a6cd63835a262077e9