Skip to content

fix: Improved Standards for Core, Extended & Workflow #28

fix: Improved Standards for Core, Extended & Workflow

fix: Improved Standards for Core, Extended & Workflow #28

Workflow file for this run

---
name: Release
"on":
push:
branches:
- main
permissions:
contents: write
issues: write
pull-requests: write
jobs:
quality:
name: QLTY Code Quality Checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install QLTY
run: curl -s https://qlty.sh | sh
- name: Run QLTY checks
run: |
export QLTY_INSTALL="$HOME/.qlty"
export PATH="$QLTY_INSTALL/bin:$PATH"
"$HOME/.qlty/bin/qlty" check --install-only
"$HOME/.qlty/bin/qlty" check
e2e-tests:
name: E2E Installation Tests
runs-on: ubuntu-latest
needs: quality
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up test environment
run: |
sudo apt-get update
sudo apt-get install -y curl git bash ca-certificates jq
- name: Make test scripts executable
run: |
chmod +x tests/e2e/test-install.sh
chmod +x tests/e2e/test-migration.sh
chmod +x tests/e2e/test-build-rules.sh
chmod +x tests/e2e/test-config-merge.sh
chmod +x scripts/install.sh
chmod +x .claude/rules/build.sh
- name: Run E2E installation tests
run: |
cd tests/e2e
bash test-install.sh
- name: Run E2E migration tests
run: |
cd tests/e2e
bash test-migration.sh
- name: Run E2E rule builder tests
run: |
cd tests/e2e
bash test-build-rules.sh
- name: Run E2E config merge tests
run: |
cd tests/e2e
bash test-config-merge.sh
- name: Upload test logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-test-logs-release
path: |
/tmp/test-*/install.log
/tmp/test-*/.claude/
retention-days: 7
if-no-files-found: ignore
release:
name: Semantic Release
runs-on: ubuntu-latest
needs: e2e-tests
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
- name: Install dependencies
run: >
npm install -g semantic-release@latest
@semantic-release/git@latest
@semantic-release/changelog@latest
@semantic-release/exec@latest
- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
- name: Update README with latest version
if: success()
run: |
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null \
|| echo "main")
if [ -f README.md ]; then
PATTERN="maxritter/claude-codepro/[^/]*/scripts/install.sh"
REPLACE="maxritter/claude-codepro/${LATEST_TAG}/scripts/"
REPLACE="${REPLACE}install.sh"
sed -i "s|${PATTERN}|${REPLACE}|g" README.md
if git diff --quiet README.md; then
echo "No changes to README.md"
else
EMAIL="github-actions[bot]@users.noreply.github.com"
git config --local user.email "${EMAIL}"
git config --local user.name "github-actions[bot]"
git add README.md
MSG="docs: update install URL to ${LATEST_TAG} [skip ci]"
git commit -m "${MSG}"
TOKEN="${{ secrets.GITHUB_TOKEN }}"
REPO="${{ github.repository }}"
URL="https://x-access-token:${TOKEN}@github.com/"
git push "${URL}${REPO}.git" HEAD:main
fi
fi