Skip to content

Commit 79e9063

Browse files
build: use release-please for releases (#126)
1 parent cbac5ef commit 79e9063

File tree

6 files changed

+55
-19
lines changed

6 files changed

+55
-19
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
node: [18, 20]
12+
node: [18, 20, 22]
1313
steps:
1414
- uses: actions/checkout@v5
1515
- uses: actions/setup-node@v6
@@ -30,17 +30,3 @@ jobs:
3030
node-version: 22
3131
- run: npm install
3232
- run: npm run lint
33-
release:
34-
if: github.ref == 'refs/heads/main'
35-
runs-on: ubuntu-latest
36-
needs: [test, lint]
37-
steps:
38-
- uses: actions/checkout@v5
39-
- uses: actions/setup-node@v6
40-
with:
41-
node-version: 22
42-
- run: npm install
43-
- run: npx semantic-release
44-
env:
45-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
name: release
6+
env:
7+
FORCE_COLOR: 2
8+
NODE: 22
9+
jobs:
10+
release-please:
11+
if: github.repository == 'JustinBeckwith/yes-https'
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
outputs:
17+
release_created: ${{ steps.release.outputs.release_created }}
18+
tag_name: ${{ steps.release.outputs.tag_name }}
19+
steps:
20+
- uses: googleapis/release-please-action@v4
21+
id: release
22+
with:
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
publish:
25+
if: needs.release-please.outputs.release_created
26+
runs-on: ubuntu-latest
27+
needs: release-please
28+
permissions:
29+
contents: write
30+
id-token: write
31+
steps:
32+
- uses: actions/checkout@v5
33+
- uses: actions/setup-node@v6
34+
with:
35+
node-version: ${{ env.NODE }}
36+
cache: npm
37+
registry-url: 'https://registry.npmjs.org'
38+
- run: npm ci
39+
- run: npm test
40+
- run: npm publish --provenance --access public

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "3.0.1"
3+
}

.releaserc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "yes-https",
3-
"version": "0.0.0",
3+
"version": "3.0.1",
44
"description": "A simple utility to force https for connect based node.js apps.",
55
"type": "module",
66
"exports": "./lib/index.js",

release-please-config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"packages": {
3+
".": {
4+
"release-type": "node",
5+
"package-name": "yes-https",
6+
"changelog-path": "CHANGELOG.md",
7+
"extra-files": ["package.json"]
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)