Skip to content

Commit

Permalink
chore: build / package fixups
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Gammon <[email protected]>
  • Loading branch information
sgammon committed Mar 18, 2024
1 parent c9165ff commit 915930b
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: "Build & Test"
tests:
description: "Run all tests"
type: boolean
default: true
default: false
secrets:
CODECOV_TOKEN:
description: "Codecov Token"
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/ci.publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,30 @@ name: "Publish: Packages"

on:
workflow_call:
inputs: {}
inputs:
dry-run:
description: "Dry Run"
type: boolean
default: false

secrets:
NPM_PUBLISH_TOKEN:
description: "NPM Publishing Token"
required: true

workflow_dispatch: {}

release:
types: [created]
workflow_dispatch:
inputs:
dry-run:
description: "Dry Run"
type: boolean
default: false

permissions:
contents: read

jobs:
publish-npm:
name: "Publish: JavaScript Packages (NPM)"
pack-npm:
name: "Package: JavaScript Releases"
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -45,14 +52,8 @@ jobs:
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: "Setup: NPM Latest"
run: npm install -g npm
- name: "Build: Packages"
run: pnpm run -r pack
- name: "Publish: Packages"
run: pnpm run publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: "Artifact: Packages"
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
Expand All @@ -62,4 +63,3 @@ jobs:
overwrite: true
path: |
packages/*/*.tgz
2 changes: 0 additions & 2 deletions .github/workflows/on.pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:
name: "Build & Test"
uses: ./.github/workflows/ci.build-test.yml
secrets: inherit
with:
tests: false # tests run automatically where needed now

build-dependency-graph:
name: "Build & Test"
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/on.push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ permissions:
contents: read

jobs:
build-test:
name: "Build & Test"
uses: ./.github/workflows/ci.build-test.yml
secrets: inherit

build-dependency-graph:
name: "Build & Test"
uses: ./.github/workflows/ci.dependency-graph.yml
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/on.release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Release"

on:
release:
types: [created]

permissions:
contents: read

jobs:
build-test:
name: "Build & Test"
uses: ./.github/workflows/ci.build-test.yml
secrets: inherit

publish-npm:
name: "Publish"
needs: [build-test]
uses: ./.github/workflows/ci.publish-packages.yml
secrets: inherit
permissions:
contents: read
id-token: write
packages: write
with:
dry-run: false

deploy-site:
name: "Deploy"
needs: [build-test]
uses: ./.github/workflows/deploy.site.yml
secrets: inherit
permissions:
contents: read
pages: write
id-token: write
Binary file modified bun.lockb
Binary file not shown.
3 changes: 2 additions & 1 deletion packages/gradle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"scripts": {
"test:bun": "bun test",
"test:node": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"publish": "pnpm run build && npm publish --no-git-checks",
"publish:dry": "npm publish --no-git-checks --dry-run",
"publish:live": "npm publish --no-git-checks",
"pack": "npm pack",
"build": "tsc -p ."
},
Expand Down
11 changes: 8 additions & 3 deletions packages/indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"index": "bun run build && bun dist/indexer.mjs ../../repository",
"test:bun": "bun test",
"test:node": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"publish": "pnpm run build && npm publish --no-git-checks",
"publish:dry": "npm publish --no-git-checks --dry-run",
"publish:live": "npm publish --no-git-checks",
"pack": "npm pack",
"build": "tsc -p ."
},
Expand All @@ -41,13 +42,14 @@
"@javamodules/gradle": "workspace:*",
"@javamodules/java": "workspace:*",
"@javamodules/maven": "workspace:*",
"chalk": "5.3.0",
"commander": "12.0.0",
"glob": "10.3.10",
"inquirer": "9.2.16"
},
"devDependencies": {
"@types/jest": "29.5.12",
"@jest/globals": "29.7.0",
"@types/jest": "29.5.12",
"@types/node": "20.11.28",
"jest": "29.7.0",
"jest-junit": "16.0.0",
Expand All @@ -60,7 +62,10 @@
"collectCoverage": true,
"coverageProvider": "v8",
"coverageDirectory": "reports",
"coverageReporters": ["lcov", "text-summary"],
"coverageReporters": [
"lcov",
"text-summary"
],
"reporters": [
"default",
"github-actions",
Expand Down
3 changes: 2 additions & 1 deletion packages/java/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"scripts": {
"test:bun": "bun test",
"test:node": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"publish": "pnpm run build && npm publish --no-git-checks",
"publish:dry": "npm publish --no-git-checks --dry-run",
"publish:live": "npm publish --no-git-checks",
"pack": "npm pack",
"build": "tsc -p ."
},
Expand Down
3 changes: 2 additions & 1 deletion packages/maven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"scripts": {
"test:bun": "bun test",
"test:node": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"publish": "pnpm run build && npm publish --no-git-checks",
"publish:dry": "npm publish --no-git-checks --dry-run",
"publish:live": "npm publish --no-git-checks",
"pack": "npm pack",
"build": "tsc -p ."
},
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 915930b

Please sign in to comment.