Skip to content

Commit ffb68b6

Browse files
committed
feat: replace semantic release with release-please for automated versioning and publishing
1 parent aa652f6 commit ffb68b6

3 files changed

Lines changed: 69 additions & 75 deletions

File tree

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
release-please:
13+
name: Release Please
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Create Release PR
18+
uses: googleapis/release-please-action@v4
19+
id: release
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
release-type: node
23+
package-name: '@lindentech/somon-script'
24+
path: .
25+
monorepo-index: 0
26+
skip-github-release: false
27+
28+
- name: Checkout (if released)
29+
if: steps.release.outputs.release_created
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
34+
- name: Setup Node.js (if released)
35+
if: steps.release.outputs.release_created
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: '20.x'
39+
cache: 'npm'
40+
registry-url: 'https://registry.npmjs.org'
41+
42+
- name: Install dependencies (if released)
43+
if: steps.release.outputs.release_created
44+
run: npm ci
45+
46+
- name: Build (if released)
47+
if: steps.release.outputs.release_created
48+
run: npm run build
49+
50+
- name: Run tests (if released)
51+
if: steps.release.outputs.release_created
52+
run: npm run test:ci
53+
54+
- name: Publish to NPM (if released)
55+
if: steps.release.outputs.release_created
56+
run: npm publish --access public
57+
env:
58+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
59+
60+
- name: Upload coverage (if released)
61+
if: steps.release.outputs.release_created
62+
uses: codecov/codecov-action@v5
63+
with:
64+
token: ${{ secrets.CODECOV_TOKEN }}
65+
files: ./coverage/lcov.info
66+
fail_ci_if_error: false
67+
flags: release
68+
name: codecov-release
69+
verbose: true

.github/workflows/semantic-release.yml

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

.releaserc.json

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

0 commit comments

Comments
 (0)