Compare commits
2 Commits
task-maste
...
feat/impro
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4107f83324 | ||
|
|
184bb5e68e |
5
.github/workflows/pre-release.yml
vendored
5
.github/workflows/pre-release.yml
vendored
@@ -3,12 +3,11 @@ name: Pre-Release (RC)
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch: # Allows manual triggering from GitHub UI/API
|
workflow_dispatch: # Allows manual triggering from GitHub UI/API
|
||||||
|
|
||||||
concurrency: pre-release-${{ github.ref_name }}
|
concurrency: pre-release-${{ github.ref }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rc:
|
rc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# Only allow pre-releases on non-main branches
|
|
||||||
if: github.ref != 'refs/heads/main'
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
34
.github/workflows/release.yml
vendored
34
.github/workflows/release.yml
vendored
@@ -38,26 +38,26 @@ jobs:
|
|||||||
run: npm ci
|
run: npm ci
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
|
|
||||||
- name: Check pre-release mode
|
- name: Exit pre-release mode and clean up
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
echo "🔄 Ensuring we're not in pre-release mode for main branch..."
|
||||||
echo "🔍 Checking pre-release mode status..."
|
|
||||||
if [[ -f .changeset/pre.json ]]; then
|
# Exit pre-release mode if we're in it
|
||||||
echo "❌ ERROR: Main branch is in pre-release mode!"
|
npx changeset pre exit || echo "Not in pre-release mode"
|
||||||
echo ""
|
|
||||||
echo "Pre-release mode should only be used on feature branches, not main."
|
# Remove pre.json file if it exists (belt and suspenders approach)
|
||||||
echo ""
|
if [ -f .changeset/pre.json ]; then
|
||||||
echo "To fix this, run the following commands locally:"
|
echo "🧹 Removing pre.json file..."
|
||||||
echo " npx changeset pre exit"
|
rm -f .changeset/pre.json
|
||||||
echo " git add -u"
|
|
||||||
echo " git commit -m 'chore: exit pre-release mode'"
|
|
||||||
echo " git push origin main"
|
|
||||||
echo ""
|
|
||||||
echo "Then re-run this workflow."
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "✅ Not in pre-release mode - proceeding with release"
|
# Verify the file is gone
|
||||||
|
if [ ! -f .changeset/pre.json ]; then
|
||||||
|
echo "✅ pre.json successfully removed"
|
||||||
|
else
|
||||||
|
echo "❌ Failed to remove pre.json"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Create Release Pull Request or Publish to npm
|
- name: Create Release Pull Request or Publish to npm
|
||||||
uses: changesets/action@v1
|
uses: changesets/action@v1
|
||||||
|
|||||||
Reference in New Issue
Block a user