diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index e45ba2d65..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: CI - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - node-version: [18, 20, 22] - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Build hooks - run: npm run build:hooks - - - name: Run tests - run: | - if npm pkg get scripts.test | grep -q '"test"'; then - npm test - else - echo "No test script defined, skipping" - fi - shell: bash - - - name: Verify installation - run: | - npm link - npx get-shit-done-cc --version - shell: bash - - lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Run lint - run: | - if npm pkg get scripts.lint | grep -q '"lint"'; then - npm run lint - else - echo "No lint script defined, skipping" - fi diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 1ac4770fd..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Release - -on: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' - - '!v*-*' # Exclude pre-release tags - -jobs: - release: - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Extract version from tag - id: version - run: | - VERSION=${GITHUB_REF#refs/tags/v} - echo "VERSION=$VERSION" >> $GITHUB_OUTPUT - echo "Releasing version: $VERSION" - - - name: Extract changelog section - id: changelog - run: | - VERSION="${{ steps.version.outputs.VERSION }}" - awk -v ver="$VERSION" ' - /^## \[/ { - if (found) exit - if ($0 ~ "\\[" ver "\\]") found=1 - } - found {print} - ' CHANGELOG.md > release_notes.md - - if [ ! -s release_notes.md ]; then - echo "## v$VERSION" > release_notes.md - echo "" >> release_notes.md - echo "See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details." >> release_notes.md - fi - - echo "Release notes:" - cat release_notes.md - - - name: Create GitHub Release - uses: softprops/action-gh-release@v2 - with: - body_path: release_notes.md - draft: false - prerelease: false - generate_release_notes: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - publish: - needs: release - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - registry-url: 'https://registry.npmjs.org' - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Build - run: npm run build:hooks - - - name: Publish to npm - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}