├── .github ├── dependabot.yml └── workflows │ └── test.yml ├── .gitignore ├── LICENSE ├── README.md ├── action.yml └── etc └── emacs-logo.png /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: / 5 | schedule: 6 | interval: daily 7 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: 'CI' 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | workflow_dispatch: 9 | 10 | concurrency: 11 | group: ${{ github.workflow }}-${{ github.ref }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | build: 16 | runs-on: ${{ matrix.os }} 17 | strategy: 18 | fail-fast: false 19 | matrix: 20 | os: [ubuntu-latest, macos-latest, windows-latest] 21 | emacs_version: [23.4, 24.1, 24.2, 24.3, 24.4, 24.5, 25.1, 25.2, 25.3, 26.1, 26.2, 26.3, 27.1, 27.2, 28.1, 28.2, 29.1, 29.2, 29.3, 29.4, snapshot] 22 | exclude: 23 | - os: macos-latest 24 | emacs_version: 23.4 25 | - os: macos-latest 26 | emacs_version: 24.1 27 | - os: macos-latest 28 | emacs_version: 24.2 29 | - os: macos-latest 30 | emacs_version: 24.3 31 | - os: macos-latest 32 | emacs_version: 24.4 33 | - os: macos-latest 34 | emacs_version: 24.5 35 | - os: macos-latest 36 | emacs_version: 25.1 37 | - os: macos-latest 38 | emacs_version: 25.2 39 | - os: macos-latest 40 | emacs_version: 25.3 41 | - os: macos-latest 42 | emacs_version: 26.1 43 | - os: macos-latest 44 | emacs_version: 26.2 45 | - os: macos-latest 46 | emacs_version: 26.3 47 | - os: macos-latest 48 | emacs_version: 27.1 49 | - os: macos-latest 50 | emacs_version: 27.2 51 | 52 | steps: 53 | - uses: actions/checkout@v4 54 | 55 | - name: Setup Emacs 56 | uses: ./ 57 | with: 58 | version: ${{ matrix.emacs_version }} 59 | 60 | - name: Check emacs version 61 | run: emacs --version 62 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependency directory 2 | node_modules 3 | 4 | # Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore 5 | # Logs 6 | logs 7 | *.log 8 | npm-debug.log* 9 | yarn-debug.log* 10 | yarn-error.log* 11 | lerna-debug.log* 12 | 13 | # Diagnostic reports (https://nodejs.org/api/report.html) 14 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 15 | 16 | # Runtime data 17 | pids 18 | *.pid 19 | *.seed 20 | *.pid.lock 21 | 22 | # Directory for instrumented libs generated by jscoverage/JSCover 23 | lib-cov 24 | 25 | # Coverage directory used by tools like istanbul 26 | coverage 27 | *.lcov 28 | 29 | # nyc test coverage 30 | .nyc_output 31 | 32 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 33 | .grunt 34 | 35 | # Bower dependency directory (https://bower.io/) 36 | bower_components 37 | 38 | # node-waf configuration 39 | .lock-wscript 40 | 41 | # Compiled binary addons (https://nodejs.org/api/addons.html) 42 | build/Release 43 | 44 | # Dependency directories 45 | jspm_packages/ 46 | 47 | # TypeScript v1 declaration files 48 | typings/ 49 | 50 | # TypeScript cache 51 | *.tsbuildinfo 52 | 53 | # Optional npm cache directory 54 | .npm 55 | 56 | # Optional eslint cache 57 | .eslintcache 58 | 59 | # Optional REPL history 60 | .node_repl_history 61 | 62 | # Output of 'npm pack' 63 | *.tgz 64 | 65 | # Yarn Integrity file 66 | .yarn-integrity 67 | 68 | # dotenv environment variables file 69 | .env 70 | .env.test 71 | 72 | # parcel-bundler cache (https://parceljs.org/) 73 | .cache 74 | 75 | # next.js build output 76 | .next 77 | 78 | # nuxt.js build output 79 | .nuxt 80 | 81 | # vuepress build output 82 | .vuepress/dist 83 | 84 | # Serverless directories 85 | .serverless/ 86 | 87 | # FuseBox cache 88 | .fusebox/ 89 | 90 | # DynamoDB Local files 91 | .dynamodb/ 92 | 93 | # OS metadata 94 | .DS_Store 95 | Thumbs.db 96 | 97 | # Ignore built ts files 98 | __tests__/runner/* 99 | lib/**/* -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2022-2025 Shen, Jen-Chieh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) 2 | [![Release](https://img.shields.io/github/release/jcs090218/setup-emacs.svg?logo=github)](https://github.com/jcs090218/setup-emacs/releases/latest) 3 | 4 | 5 | # Set up Emacs 6 | > GitHub action which installs a given Emacs version 7 | 8 | [![CI](https://github.com/jcs090218/setup-emacs/actions/workflows/test.yml/badge.svg)](https://github.com/jcs090218/setup-emacs/actions/workflows/test.yml) 9 | [![dependencies Status](https://status.david-dm.org/gh/jcs090218/setup-emacs.svg)](https://david-dm.org/jcs090218/setup-emacs) 10 | 11 | This is a simple action that merges these two actions 🎉 12 | 13 | - [purcell/setup-emacs](https://github.com/purcell/setup-emacs) 14 | - [jcs090218/setup-emacs-windows](https://github.com/jcs090218/setup-emacs-windows) 15 | 16 | This allow us to use Emacs across all operating systems! 17 | 18 | ## 🔨 Usage 19 | 20 | ```yaml 21 | uses: jcs090218/setup-emacs@master 22 | with: 23 | version: 24.5 24 | ``` 25 | 26 | ## ❓ What does it solve? 27 | 28 | You use to have to do this to install Emacs on `Unix` and `Windows`. 29 | 30 | ```yml 31 | steps: 32 | - uses: actions/checkout@v4 33 | 34 | - uses: purcell/setup-emacs@master 35 | if: runner.os == 'Linux' || runner.os == 'macOS' 36 | with: 37 | version: ${{ matrix.emacs-version }} 38 | 39 | - uses: jcs090218/setup-emacs-windows@master 40 | if: runner.os == 'Windows' 41 | with: 42 | version: ${{ matrix.emacs-version }} 43 | ``` 44 | 45 | Now you only need this, 46 | 47 | ```yml 48 | steps: 49 | - uses: actions/checkout@v3 50 | 51 | - uses: jcs090218/setup-emacs@master 52 | with: 53 | version: ${{ matrix.emacs-version }} 54 | ``` 55 | 56 | ### ❓ Diff View 57 | 58 | In `diff` view, 59 | 60 | ```diff 61 | steps: 62 | - uses: actions/checkout@v4 63 | 64 | - - uses: purcell/setup-emacs@master 65 | - if: runner.os == 'Linux' || runner.os == 'macOS' 66 | - with: 67 | - version: ${{ matrix.emacs-version }} 68 | 69 | - - uses: jcs090218/setup-emacs-windows@master 70 | - if: runner.os == 'Windows' 71 | + - uses: jcs090218/setup-emacs@master 72 | with: 73 | version: ${{ matrix.emacs-version }} 74 | ``` 75 | 76 | ## ⚜️ License 77 | 78 | Permission is hereby granted, free of charge, to any person obtaining a copy 79 | of this software and associated documentation files (the "Software"), to deal 80 | in the Software without restriction, including without limitation the rights 81 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 82 | copies of the Software, and to permit persons to whom the Software is 83 | furnished to do so, subject to the following conditions: 84 | 85 | The above copyright notice and this permission notice shall be included in all 86 | copies or substantial portions of the Software. 87 | 88 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 89 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 90 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 91 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 92 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 93 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 94 | SOFTWARE. 95 | 96 | See [`LICENSE`](./LICENSE) for details. 97 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Setup Emacs' 2 | description: 'Install a specific Emacs version for use in your workflow.' 3 | author: 'Jen-Chieh Shen' 4 | inputs: 5 | version: 6 | description: 'The version of Emacs to install, e.g. "24.3", or "snapshot" for a recent development version.' 7 | runs: 8 | using: composite 9 | steps: 10 | - if: runner.os != 'Windows' 11 | uses: purcell/setup-emacs@master 12 | with: 13 | version: ${{ inputs.version }} 14 | - if: runner.os == 'Windows' 15 | uses: jcs090218/setup-emacs-windows@master 16 | with: 17 | version: ${{ inputs.version }} 18 | -------------------------------------------------------------------------------- /etc/emacs-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcs090218/setup-emacs/651f9c6b9f6224dbd38c1ec2c16227de537128f4/etc/emacs-logo.png --------------------------------------------------------------------------------