Skip to content

Commit 8673600

Browse files
author
mostafa rastegar
committed
docs(README): update installation guide
1 parent 582c888 commit 8673600

2 files changed

Lines changed: 10 additions & 32 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,75 +3,52 @@ on:
33
pull_request:
44
types: [closed]
55
branches:
6-
- main
7-
- next
8-
push:
9-
branches:
10-
- main
11-
- next
12-
6+
- main
137
permissions:
148
contents: write
159
issues: write
1610
pull-requests: write
17-
packages: write
1811

1912
jobs:
2013
release:
2114
runs-on: ubuntu-latest
2215
if: |
23-
(github.event_name == 'pull_request' && github.event.pull_request.merged == true) ||
24-
(github.event_name == 'push')
16+
github.event.pull_request.merged == true &&
17+
github.event.pull_request.base.ref == 'main'
2518
2619
steps:
2720
- name: 🔍 Debug Info
2821
run: |
2922
echo "Event: ${{ github.event_name }}"
30-
echo "Ref: ${{ github.ref }}"
31-
echo "Branch: ${{ github.ref_name }}"
23+
echo "PR Base Branch: ${{ github.event.pull_request.base.ref }}"
24+
echo "PR Head Branch: ${{ github.event.pull_request.head.ref }}"
3225
echo "Merged: ${{ github.event.pull_request.merged }}"
3326
3427
- name: 📥 Checkout
3528
uses: actions/checkout@v4
3629
with:
37-
fetch-depth: 0 # Required for semantic-release
30+
fetch-depth: 0
31+
# Checkout main branch (target branch)
32+
ref: main
3833
token: ${{ secrets.GITHUB_TOKEN }}
3934

4035
- name: 📦 Setup Node.js
4136
uses: actions/setup-node@v4
4237
with:
4338
node-version: "22.x"
4439
cache: 'npm'
45-
registry-url: 'https://registry.npmjs.org'
4640

4741
- name: 📋 Install dependencies
4842
run: npm ci
4943

5044
- name: 🏗️ Build
5145
run: npm run build
5246

53-
- name: 🔐 Audit
54-
run: npm audit signatures
55-
5647
- name: 🧪 Run tests
5748
run: npm run test:ci
5849

59-
- name: 🔍 Debug semantic-release (dry-run)
60-
run: npx semantic-release --dry-run
61-
env:
62-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
64-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
65-
6650
- name: 🚀 Release
6751
run: npx semantic-release
6852
env:
6953
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
71-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
72-
73-
- name: 📊 Release Status
74-
if: always()
75-
run: |
76-
echo "✅ Release workflow completed"
77-
echo "Check the logs above for any issues"
54+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
- 🐛 **Issues & Support**: [GitHub Issues](https://github.com/mostafarastegar/react-constore/issues)
2727

2828
---
29+
2930
## 📋 Table of Contents
3031

3132
### 🚀 Getting Started

0 commit comments

Comments
 (0)