Skip to content

Commit

Permalink
Added macOS installer
Browse files Browse the repository at this point in the history
  • Loading branch information
elC0mpa authored Jul 20, 2024
2 parents a6ff5a8 + b18c44d commit 899672b
Showing 4 changed files with 63 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -33,17 +33,21 @@ jobs:
run: |
chmod +x scripts/build-and-release/create-linux-installer.sh
chmod +x scripts/build-and-release/create-windows-installer.sh
chmod +x scripts/build-and-release/create-macos-installer.sh
- name: Create Linux Installer
run: scripts/build-and-release/create-linux-installer.sh $GITHUB_REPOSITORY $RELEASE_TAG

- name: Create Windows Installer
run: scripts/build-and-release/create-windows-installer.sh

- name: Create macOS Installer
run: scripts/build-and-release/create-macos-installer.sh $GITHUB_REPOSITORY $RELEASE_TAG

- name: Build NSIS Installer
run: makensis build/installer.nsi -DREPO_NAME=$REPO_NAME

- name: Create GitHub Release
run: |
gh auth login --with-token <<< "${{ secrets.RELEASE_TOKEN }}"
gh release create $RELEASE_TAG build/installer-windows.exe build/installer-linux.sh build/config.tar.gz -t "$RELEASE_TAG" -F release_notes.txt
gh release create $RELEASE_TAG build/installer-windows.exe build/installer-linux.sh build/installer-macos.sh build/config.tar.gz -t "$RELEASE_TAG" -F release_notes.txt
29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -39,14 +39,35 @@ This Neovim configuration is tailored for a streamlined and feature-rich develop

## Installation & Usage

#### Linux
### Linux

Execute the following command to install:

```bash
curl -sSL https://github.com/elC0mpa/neovim-configuration/releases/download/v1.4.1/installer-linux.sh | bash
```

Or execute the following command to install from the downloaded file:

```bash
bash installer-linux.sh
```

### MacOS

Execute the following command to install:

```bash
curl -sSL https://github.com/elC0mpa/neovim-configuration/releases/download/v1.4.1/installer-macos.sh | bash
```

Or execute the following command to install from the downloaded file:

```bash
curl -sSL installer-linux.sh | bash
bash installer-macos.sh
```

#### Windows
### Windows

Download and execute `installer-windows.exe` from the releases page.

@@ -56,4 +77,4 @@ You can customize the configuration by editing the relevant files in the `~/.con

---

*Please note that this configuration might require Neovim 0.5 or higher, and some plugins might need additional dependencies to be installed on your system.*
_Please note that this configuration might require Neovim 0.5 or higher, and some plugins might need additional dependencies to be installed on your system._
32 changes: 32 additions & 0 deletions scripts/build-and-release/create-macos-installer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

# Validate inputs
if [[ -z "$1" || -z "$2" ]]; then
echo "Usage: $0 <github_repository> <release_tag>"
exit 1
fi

GITHUB_REPOSITORY=$1
RELEASE_TAG=$2

# Create the build directory if it doesn't exist
mkdir -p build

# Create release pack
mkdir -p temp
tar -czvf build/config.tar.gz --exclude='.github' --exclude='temp' --exclude='.git' --exclude='scripts' --exclude='build' .
rm -rf temp

# Create macOS Installer
cat << EOF > build/installer-macos.sh
#!/bin/bash
echo "Downloading Neovim configuration..."
curl -LO "https://github.com/$GITHUB_REPOSITORY/releases/download/$RELEASE_TAG/config.tar.gz"
echo "Extracting Neovim configuration..."
mkdir -p ~/.config/nvim
tar xz -C ~/.config/nvim -f config.tar.gz
echo "Installation complete!"
rm -f config.tar.gz
EOF

chmod +x build/installer-macos.sh
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.3.0
v1.4.3

0 comments on commit 899672b

Please sign in to comment.