Skip to content

Commit cfa138b

Browse files
authored
chore: Adding release plz (#98)
Adding release plz Signed-off-by: Todd Baert <[email protected]>
1 parent 26c0b07 commit cfa138b

File tree

4 files changed

+56
-30
lines changed

4 files changed

+56
-30
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
name: Run Release Please
6+
jobs:
7+
release-please:
8+
runs-on: ubuntu-latest
9+
10+
# Release-please creates a PR that tracks all changes
11+
steps:
12+
- uses: google-github-actions/release-please-action@v3
13+
id: release
14+
with:
15+
command: manifest
16+
token: ${{secrets.GITHUB_TOKEN}}
17+
default-branch: main
18+
19+
# The logic below handles the npm publication:
20+
- name: Checkout Repository
21+
if: ${{ steps.release.outputs.releases_created }}
22+
uses: actions/checkout@v2
23+
- name: Setup Node
24+
uses: actions/setup-node@v3
25+
if: ${{ steps.release.outputs.releases_created }}
26+
with:
27+
node-version: 16
28+
registry-url: 'https://registry.npmjs.org'
29+
- name: Build Packages
30+
if: ${{ steps.release.outputs.releases_created }}
31+
run: |
32+
npm ci
33+
npm run build
34+
35+
# Release Please has already incremented versions and published tags, so we just
36+
# need to publish all unpublished versions to NPM here
37+
# Our scripts only publish versions that do not already exist.
38+
- name: Publish to NPM
39+
if: ${{ steps.release.outputs.releases_created }}
40+
env:
41+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
42+
run: npm run publish

.github/workflows/release.yml

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

.release-please-manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

release-please-config.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"bootstrap-sha": "9ec6555fb0a9144a70020e52d8c718c8424db225",
3+
"packages": {
4+
".": {
5+
"releaseType": "node",
6+
"prerelease": false,
7+
"bumpMinorPreMajor": false,
8+
"bumpPatchForMinorPreMajor": false,
9+
"changelogPath": "CHANGELOG.md",
10+
"versioning": "default"
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)