Skip to content

Commit

Permalink
Merge workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Jan 10, 2025
1 parent 397a11d commit dca3cca
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 84 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/coverage.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/publish-jsr.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/publish-npm.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Publish release
on:
release:
types: [created]
workflow_dispatch:
jobs:
publish-jsr:
name: Publish to JSR.io
runs-on: ubuntu-2404
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-2404
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-2404
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 }}
14 changes: 13 additions & 1 deletion .github/workflows/nodejs.yml → .github/workflows/test-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- run: npm run build --if-present
- run: npm run lint --if-present
node:
name: v${{ matrix.node }} @ ubuntu-latest
name: Node v${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -50,3 +50,15 @@ jobs:
- run: npm install
- run: npm run build --if-present
- run: npm test
coverage:
name: Measure test coverage on node
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
with:
registry-url: 'https://registry.npmjs.org'
cache: npm
- run: npm install
- run: npm run build --if-present
- run: npm run test:coverage
28 changes: 0 additions & 28 deletions .github/workflows/upload-release.yml

This file was deleted.

0 comments on commit dca3cca

Please sign in to comment.