Skip to content

Commit 616965f

Browse files
authored
fix(workflows) delete emojis and include ascii mesages (#48)
1 parent 93dafb5 commit 616965f

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

.github/workflows/auto-publish.yml

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ jobs:
4747
yarn --version
4848
4949
# Always run yarn install to ensure lockfile exists and is up to date
50-
echo "📦 Running yarn install..."
50+
echo "Running yarn install..."
5151
yarn install
52-
echo "Dependencies installed and lockfile ready"
52+
echo "Dependencies installed and lockfile ready"
5353
5454
- name: Setup Node.js with cache
5555
uses: actions/setup-node@v4
@@ -67,11 +67,11 @@ jobs:
6767
6868
# Simplified pattern that properly handles hyphens, underscores, and dots
6969
if [[ "$BRANCH_NAME" =~ ^(feat|feature|fix|bugfix|break|breaking|hotfix|chore)/[a-zA-Z0-9._-]+$ ]]; then
70-
echo "Branch pattern accepted: $BRANCH_NAME"
70+
echo "Branch pattern accepted: $BRANCH_NAME"
7171
echo "should_publish=true" >> "$GITHUB_OUTPUT"
7272
echo "branch_name=$BRANCH_NAME" >> "$GITHUB_OUTPUT"
7373
else
74-
echo "Branch '$BRANCH_NAME' doesn't match required patterns"
74+
echo "Branch '$BRANCH_NAME' doesn't match required patterns"
7575
echo "should_publish=false" >> "$GITHUB_OUTPUT"
7676
fi
7777
@@ -91,16 +91,16 @@ jobs:
9191
const scripts = pkg.scripts || {};
9292
9393
if (!scripts['test:ci']) {
94-
console.error('Missing test:ci script in package.json');
94+
console.error('Missing test:ci script in package.json');
9595
process.exit(1);
9696
}
9797
9898
if (!scripts['dist']) {
99-
console.error('Missing dist script in package.json');
99+
console.error('Missing dist script in package.json');
100100
process.exit(1);
101101
}
102102
103-
console.log('Required scripts found:');
103+
console.log('Required scripts found:');
104104
console.log(' - test:ci:', scripts['test:ci']);
105105
console.log(' - dist:', scripts['dist']);
106106
"
@@ -110,36 +110,36 @@ jobs:
110110
run: |
111111
# Linting
112112
if yarn run --help | grep -q "lint"; then
113-
echo "🔍 Running linter..."
113+
echo "Running linter..."
114114
yarn lint
115115
fi
116116
117117
# Type checking
118118
if yarn run --help | grep -q "type-check"; then
119-
echo "🔍 Type checking..."
119+
echo "Type checking..."
120120
yarn type-check
121121
fi
122122
123123
- name: Run tests
124124
if: steps.validate-branch.outputs.should_publish == 'true'
125125
run: |
126-
echo "🧪 Running tests..."
126+
echo "Running tests..."
127127
yarn test:ci
128128
129129
# Check coverage if exists
130130
if [ -f "coverage/lcov.info" ]; then
131-
echo "📊 Coverage report generated"
131+
echo "Coverage report generated"
132132
fi
133133
134134
- name: Build package
135135
if: steps.validate-branch.outputs.should_publish == 'true'
136136
run: |
137-
echo "🏗️ Building package..."
137+
echo "Building package..."
138138
yarn dist
139139
140140
# Verify that the build generated files
141141
if [ ! -d "dist" ] && [ ! -d "lib" ] && [ ! -d "build" ]; then
142-
echo "No build output found"
142+
echo "No build output found"
143143
exit 1
144144
fi
145145
@@ -152,11 +152,11 @@ jobs:
152152
153153
# Set up authentication for push operations
154154
if [ -n "${{ secrets.RELEASE_TOKEN }}" ]; then
155-
echo "🔐 Using RELEASE_TOKEN with branch protection bypass permissions"
155+
echo "Using RELEASE_TOKEN with branch protection bypass permissions"
156156
git remote set-url origin https://x-access-token:${{ secrets.RELEASE_TOKEN }}@github.com/${{ github.repository }}.git
157157
else
158-
echo "⚠️ Using default GITHUB_TOKEN - may fail on protected branches"
159-
echo "💡 Add RELEASE_TOKEN secret with 'Contents: write' and 'Pull requests: write' permissions"
158+
echo "Using default GITHUB_TOKEN - may fail on protected branches"
159+
echo "Add RELEASE_TOKEN secret with 'Contents: write' and 'Pull requests: write' permissions"
160160
fi
161161
162162
- name: Determine version bump (Enhanced)
@@ -167,7 +167,7 @@ jobs:
167167
PR_TITLE="${{ github.event.pull_request.title }}"
168168
PR_BODY="${{ github.event.pull_request.body }}"
169169
170-
echo "🔍 Analyzing PR for version bump..."
170+
echo "Analyzing PR for version bump..."
171171
echo "Branch: $BRANCH_NAME"
172172
echo "Title: $PR_TITLE"
173173
@@ -179,14 +179,14 @@ jobs:
179179
[[ $BRANCH_NAME =~ ^breaking/ ]]; then
180180
VERSION_TYPE="major"
181181
REASON="Breaking change detected"
182-
echo "💥 MAJOR: $REASON"
182+
echo "MAJOR: $REASON"
183183
184184
# 2. Check conventional commits in title
185185
elif echo "$PR_TITLE" | grep -Eq "^(feat|feature)(\(.+\))?!:" || \
186186
echo "$PR_TITLE" | grep -Eq "^(fix|bugfix)(\(.+\))?!:"; then
187187
VERSION_TYPE="major"
188188
REASON="Breaking change in conventional commit"
189-
echo "💥 MAJOR: $REASON"
189+
echo "MAJOR: $REASON"
190190
191191
# 3. Check features (minor)
192192
elif echo "$PR_TITLE" | grep -Eq "^(feat|feature)(\(.+\))?:" || \
@@ -195,18 +195,18 @@ jobs:
195195
echo "$PR_TITLE" | grep -qi "\[feature\]"; then
196196
VERSION_TYPE="minor"
197197
REASON="New feature detected"
198-
echo "MINOR: $REASON"
198+
echo "MINOR: $REASON"
199199
200200
# 4. Check fixes and other changes (patch)
201201
else
202202
VERSION_TYPE="patch"
203203
REASON="Bug fix or other changes"
204-
echo "🐛 PATCH: $REASON"
204+
echo "PATCH: $REASON"
205205
fi
206206
207207
# Get current version
208208
CURRENT_VERSION=$(node -p "require('./package.json').version")
209-
echo "📦 Current version: $CURRENT_VERSION"
209+
echo "Current version: $CURRENT_VERSION"
210210
211211
# Calculate new version
212212
NEW_VERSION=$(node -e "
@@ -228,8 +228,8 @@ jobs:
228228
console.log(parts.join('.'));
229229
")
230230
231-
echo "🚀 New version will be: $NEW_VERSION"
232-
echo "🎯 Decision reason: $REASON"
231+
echo "New version will be: $NEW_VERSION"
232+
echo "Decision reason: $REASON"
233233
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
234234
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
235235
echo "version_type=$VERSION_TYPE" >> $GITHUB_OUTPUT
@@ -243,13 +243,13 @@ jobs:
243243
244244
# Check if version already exists in NPM
245245
if npm view "$PACKAGE_NAME@$NEW_VERSION" version 2>/dev/null; then
246-
echo "Version $NEW_VERSION already exists in NPM"
246+
echo "Version $NEW_VERSION already exists in NPM"
247247
exit 1
248248
fi
249249
250250
# Check if tag already exists
251251
if git tag -l | grep -q "^v$NEW_VERSION$"; then
252-
echo "Tag v$NEW_VERSION already exists"
252+
echo "Tag v$NEW_VERSION already exists"
253253
exit 1
254254
fi
255255
@@ -279,7 +279,7 @@ jobs:
279279
- name: Dry run publish (verification)
280280
if: steps.validate-branch.outputs.should_publish == 'true'
281281
run: |
282-
echo "🔍 Performing dry run..."
282+
echo "Performing dry run..."
283283
npm publish --dry-run --access public
284284
env:
285285
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -291,37 +291,37 @@ jobs:
291291
NEW_VERSION="${{ steps.version-bump.outputs.new_version }}"
292292
VERSION_TYPE="${{ steps.version-bump.outputs.version_type }}"
293293
294-
echo "📦 Publishing to NPM..."
294+
echo "Publishing to NPM..."
295295
296296
if [[ "$VERSION_TYPE" == "major" ]]; then
297-
echo "⚠️ Publishing MAJOR version $NEW_VERSION"
297+
echo "Publishing MAJOR version $NEW_VERSION"
298298
npm publish --access public --tag latest
299299
else
300300
npm publish --access public --tag latest
301301
fi
302302
303-
echo "Successfully published to NPM"
303+
echo "Successfully published to NPM"
304304
echo "published=true" >> $GITHUB_OUTPUT
305305
env:
306306
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
307307

308308
- name: Push changes and tags
309309
if: steps.npm-publish.outputs.published == 'true'
310310
run: |
311-
echo "📤 Pushing changes to repository..."
311+
echo "Pushing changes to repository..."
312312
313313
if [ -n "${{ secrets.RELEASE_TOKEN }}" ]; then
314-
echo "🔐 Using RELEASE_TOKEN to bypass branch protection"
314+
echo "Using RELEASE_TOKEN to bypass branch protection"
315315
git push origin main
316316
git push origin --tags
317-
echo "Changes and tags pushed successfully to main"
317+
echo "Changes and tags pushed successfully to main"
318318
else
319-
echo "⚠️ Using GITHUB_TOKEN - attempting push (may fail on protected branches)"
319+
echo "Using GITHUB_TOKEN - attempting push (may fail on protected branches)"
320320
if git push origin main && git push origin --tags; then
321-
echo "Changes and tags pushed successfully"
321+
echo "Changes and tags pushed successfully"
322322
else
323-
echo "Push failed - likely due to branch protection rules"
324-
echo "💡 Consider adding RELEASE_TOKEN secret with bypass permissions"
323+
echo "Push failed - likely due to branch protection rules"
324+
echo "Consider adding RELEASE_TOKEN secret with bypass permissions"
325325
exit 1
326326
fi
327327
fi

0 commit comments

Comments
 (0)