Skip to content

Commit f79270e

Browse files
authored
Merge pull request #1 from hidaytrahman/feature/cicd
chore: cicd release with npm publish and changelog
2 parents cd57200 + 91bb7c9 commit f79270e

File tree

5 files changed

+54
-1
lines changed

5 files changed

+54
-1
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: 📥 Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: 🤖 Run release-please
17+
uses: google-github-actions/release-please-action@v4
18+
with:
19+
release-type: node
20+
package-name: create-reactw-app

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release to npm
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*" # Triggers only when you push a version tag like v1.0.0
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: 🛎️ Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: 🟢 Use Node.js 18
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: "18"
20+
registry-url: "https://registry.npmjs.org/"
21+
22+
- name: 📦 Install dependencies
23+
run: yarn install
24+
25+
- name: 🚀 Publish to npm
26+
run: yarn publish --non-interactive --access public
27+
env:
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.release-please-manifest.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"create-reactw-app": {
3+
"release-type": "node"
4+
}
5+
}

CHANGELOG.md

Whitespace-only changes.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-reactw-app",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Create a React + TypeScript + Webpack project using the template-rtw boilerplate",
55
"bin": {
66
"create-reactw-app": "./cli.js"

0 commit comments

Comments
 (0)