Skip to content

Commit d6b2ae3

Browse files
author
mostafa rastegar
committed
chore: change brange target for release-configs
1 parent 8673600 commit d6b2ae3

2 files changed

Lines changed: 30 additions & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,72 @@ on:
33
pull_request:
44
types: [closed]
55
branches:
6-
- main
6+
- main
7+
push:
8+
branches:
9+
- main
10+
711
permissions:
812
contents: write
913
issues: write
1014
pull-requests: write
15+
packages: write
1116

1217
jobs:
1318
release:
1419
runs-on: ubuntu-latest
1520
if: |
16-
github.event.pull_request.merged == true &&
17-
github.event.pull_request.base.ref == 'main'
21+
(github.event_name == 'pull_request' && github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main')
1822
1923
steps:
2024
- name: 🔍 Debug Info
2125
run: |
2226
echo "Event: ${{ github.event_name }}"
23-
echo "PR Base Branch: ${{ github.event.pull_request.base.ref }}"
24-
echo "PR Head Branch: ${{ github.event.pull_request.head.ref }}"
27+
echo "Ref: ${{ github.ref }}"
28+
echo "Branch: ${{ github.ref_name }}"
2529
echo "Merged: ${{ github.event.pull_request.merged }}"
2630
2731
- name: 📥 Checkout
2832
uses: actions/checkout@v4
2933
with:
30-
fetch-depth: 0
31-
# Checkout main branch (target branch)
32-
ref: main
34+
fetch-depth: 0 # Required for semantic-release
3335
token: ${{ secrets.GITHUB_TOKEN }}
3436

3537
- name: 📦 Setup Node.js
3638
uses: actions/setup-node@v4
3739
with:
3840
node-version: "22.x"
3941
cache: 'npm'
42+
registry-url: 'https://registry.npmjs.org'
4043

4144
- name: 📋 Install dependencies
4245
run: npm ci
4346

4447
- name: 🏗️ Build
4548
run: npm run build
4649

50+
- name: 🔐 Audit
51+
run: npm audit signatures
52+
4753
- name: 🧪 Run tests
4854
run: npm run test:ci
4955

56+
- name: 🔍 Debug semantic-release (dry-run)
57+
run: npx semantic-release --dry-run
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
61+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
62+
5063
- name: 🚀 Release
5164
run: npx semantic-release
5265
env:
5366
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
67+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
68+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
69+
70+
- name: 📊 Release Status
71+
if: always()
72+
run: |
73+
echo "✅ Release workflow completed"
74+
echo "Check the logs above for any issues"

release.config.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = {
2929

3030
// No release for these
3131
{ type: "style", release: false },
32-
{ type: "chore", release: false },
32+
{ type: "chore", release: "patch" },
3333
{ type: "test", release: false },
3434
{ type: "ci", release: false },
3535
{ type: "build", release: false },

0 commit comments

Comments
 (0)