Skip to content

Commit

Permalink
chore: bootstrap releases for path: . (#400)
Browse files Browse the repository at this point in the history
* chore: bootstrap releases for path: .

* fixup: add GitHub action

* fixup: use nvmrc for node version

* fixup: reuse npm cache if present
  • Loading branch information
freakyfelt authored May 24, 2024
1 parent a86ba76 commit df8b891
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 51 deletions.
1 change: 1 addition & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ jobs:
uses: fastify/github-action-merge-dependabot@v3
with:
use-github-auto-merge: true
github-token: ${{ secrets.GH_PUSH_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/npm-publish.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
push:
branches:
- main
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.GH_PUSH_TOKEN }}
release-type: node
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- run: npm ci
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "2.1.0"
}
15 changes: 0 additions & 15 deletions .releaserc

This file was deleted.

8 changes: 0 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"pretest:ci": "npm run build:check",
"posttest": "npm run build:check && npm run lint:fix && npm run format",
"posttest:ci": "npm run lint && npm run format:check",
"release:generate": "semantic-release",
"test": "tsx --test lib/**/*.test.ts",
"test:ci": "tsx --test lib/**/*.test.ts",
"test:watch": "tsx --test --watch lib/**/*.test.ts"
Expand All @@ -38,12 +37,6 @@
"lru-cache": "^10.0.0"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.2",
"@semantic-release/commit-analyzer": "^12.0.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^10.0.2",
"@semantic-release/npm": "^12.0.0",
"@semantic-release/release-notes-generator": "^13.0.0",
"@tsconfig/node18": "^18.2.4",
"@types/benchmark": "^2.1.2",
"@types/jest": "^29.2.2",
Expand All @@ -55,7 +48,6 @@
"eslint": "^8.35.0",
"eslint-config-prettier": "^9.0.0",
"prettier": "^3.0.0",
"semantic-release": "^23.0.0",
"tsup": "^8.0.2",
"tsx": "^4.10.3",
"typescript": "^5.4.5"
Expand Down
13 changes: 13 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"packages": {
".": {
"changelog-path": "CHANGELOG.md",
"release-type": "node",
"bump-minor-pre-major": false,
"bump-patch-for-minor-pre-major": false,
"draft": false,
"prerelease": false
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}

0 comments on commit df8b891

Please sign in to comment.