diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml deleted file mode 100644 index c6df7f0..0000000 --- a/.github/workflows/auto-merge.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Auto-merge - -on: - pull_request: - types: [opened, synchronize, reopened] - -permissions: - contents: write - pull-requests: write - -jobs: - auto-merge: - if: github.event.pull_request.user.login == 'chiply' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name - runs-on: ubuntu-latest - steps: - - name: Approve PR - env: - GH_TOKEN: ${{ github.token }} - run: gh pr review "${{ github.event.pull_request.number }}" --repo "${{ github.repository }}" --approve - - - name: Enable auto-merge - env: - GH_TOKEN: ${{ github.token }} - run: gh pr merge "${{ github.event.pull_request.number }}" --repo "${{ github.repository }}" --auto --squash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d03b92..dbf8175 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,10 @@ on: pull_request: branches: [main] +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + permissions: contents: read @@ -15,14 +19,20 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, windows-latest] emacs-version: + - 28.2 - 29.4 + - 30.2 - snapshot steps: - uses: actions/checkout@v4 + - name: Cache Nix store + if: runner.os != 'Windows' + uses: DeterminateSystems/magic-nix-cache-action@main + - name: Set up Emacs uses: jcs090218/setup-emacs@master with: @@ -33,6 +43,12 @@ jobs: with: version: 'snapshot' + - name: Cache Eask dependencies + uses: actions/cache@v4 + with: + path: .eask + key: eask-${{ runner.os }}-${{ matrix.emacs-version }}-${{ hashFiles('Eask') }} + - name: Install dependencies run: eask install-deps @@ -42,6 +58,33 @@ jobs: - name: Run tests run: eask test ert test/space-tree-test.el + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Cache Nix store + uses: DeterminateSystems/magic-nix-cache-action@main + + - name: Set up Emacs + uses: jcs090218/setup-emacs@master + with: + version: 29.4 + + - name: Set up Eask + uses: emacs-eask/setup-eask@master + with: + version: 'snapshot' + + - name: Cache Eask dependencies + uses: actions/cache@v4 + with: + path: .eask + key: eask-lint-${{ hashFiles('Eask') }} + + - name: Install dependencies + run: eask install-deps + - name: Package lint run: eask lint package continue-on-error: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 14d1f1e..8f5491a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,28 +13,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: googleapis/release-please-action@v4 - id: release with: config-file: release-please-config.json manifest-file: .release-please-manifest.json - - - uses: actions/checkout@v4 - if: ${{ steps.release.outputs.release_created }} - - - name: Update version in Elisp files - if: ${{ steps.release.outputs.release_created }} - run: | - VERSION="${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}" - for file in *.el; do - sed -i "s/;; Version: .*/;; Version: ${VERSION}/" "$file" - done - sed -i "s/\"[0-9]*\.[0-9]*\.[0-9]*\"/\"${VERSION}\"/" Eask - - - name: Commit version bump - if: ${{ steps.release.outputs.release_created }} - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add -A - git diff --staged --quiet || git commit -m "chore: bump version to ${{ steps.release.outputs.tag_name }}" - git push diff --git a/Eask b/Eask index bea8dd1..4637f7c 100644 --- a/Eask +++ b/Eask @@ -1,7 +1,9 @@ ; -*- lexical-binding: t -*- (package "space-tree" +; x-release-please-start-version "0.1.0" +; x-release-please-end "Tree-based workspace management") (website-url "https://github.com/chiply/space-tree") @@ -15,7 +17,7 @@ (source "gnu") (source "melpa") -(depends-on "emacs" "29.1") +(depends-on "emacs" "28.1") (depends-on "ht" "2.3") (depends-on "dash" "2.19") diff --git a/README.md b/README.md index b44b454..ccb7c81 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # space-tree -Tree-based workspace management for Emacs. +Tree-based workspace management for Emacs. Supports Emacs 28.1+. ## Overview diff --git a/release-please-config.json b/release-please-config.json index c9a5c0a..26ce142 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -7,7 +7,17 @@ "bump-minor-pre-major": true, "bump-patch-for-minor-pre-major": true, "include-component-in-tag": false, - "include-v-in-tag": true + "include-v-in-tag": true, + "extra-files": [ + { + "type": "generic", + "path": "space-tree.el" + }, + { + "type": "generic", + "path": "Eask" + } + ] } } } diff --git a/space-tree.el b/space-tree.el index 8fa5d39..0c21140 100644 --- a/space-tree.el +++ b/space-tree.el @@ -5,8 +5,10 @@ ;; Author: Charlie Holland ;; Maintainer: Charlie Holland ;; URL: https://github.com/chiply/space-tree +;; x-release-please-start-version ;; Version: 0.1.0 -;; Package-Requires: ((emacs "29.1") (ht "2.3") (dash "2.19")) +;; x-release-please-end +;; Package-Requires: ((emacs "28.1") (ht "2.3") (dash "2.19")) ;; Keywords: convenience, frames ;;; Commentary: @@ -238,7 +240,8 @@ SPACES-THIS-LEVEL-HT is the hashtable of spaces at this level." (propertize (concat space-name-or-number "' ") 'face 'bold) (concat space-name-or-number " ")) ))) - (sort (ht-keys spaces-this-level-ht) (lambda (a b) (< a b))))) + (sort (ht-keys spaces-this-level-ht) (lambda (a b) (< a b))) + "")) (defun space-tree-modeline-lighter () "Return a string to be used as the modeline lighter for space-tree.