Skip to content

Commit d51d062

Browse files
authored
Merge pull request #1 from evert-arias/master
Added GitHub Actions Workflow and README.md File
2 parents 0f816e2 + 1b45e73 commit d51d062

File tree

5 files changed

+181
-0
lines changed

5 files changed

+181
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build and Release Installers
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
17+
- name: Set Repo Name and Release Tag
18+
run: |
19+
echo "REPO_NAME=$(basename $GITHUB_REPOSITORY)" >> $GITHUB_ENV
20+
echo "RELEASE_TAG=$(cat version.txt)" >> $GITHUB_ENV
21+
22+
- name: Compose Release Notes
23+
run: |
24+
echo "Release notes for $RELEASE_TAG." > release_notes.txt
25+
git log --pretty=format:"- [%h](https://github.com/$GITHUB_REPOSITORY/commit/%H) %s%n" -10 >> release_notes.txt
26+
27+
- name: Install Dependencies
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install p7zip-full nsis gh
31+
32+
- name: Make scripts executable
33+
run: |
34+
chmod +x scripts/build-and-release/create-linux-installer.sh
35+
chmod +x scripts/build-and-release/create-windows-installer.sh
36+
37+
- name: Create Linux Installer
38+
run: scripts/build-and-release/create-linux-installer.sh $GITHUB_REPOSITORY $RELEASE_TAG
39+
40+
- name: Create Windows Installer
41+
run: scripts/build-and-release/create-windows-installer.sh
42+
43+
- name: Build NSIS Installer
44+
run: makensis build/installer.nsi -DREPO_NAME=$REPO_NAME
45+
46+
- name: Create GitHub Release
47+
run: |
48+
gh auth login --with-token <<< "${{ secrets.RELEASE_TOKEN }}"
49+
gh release create $RELEASE_TAG build/installer-windows.exe build/installer-linux.sh build/config.tar.gz -t "$RELEASE_TAG" -F release_notes.txt

README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Neovim Configuration
2+
3+
[![Build and Release Installers](https://github.com/evert-arias/neovim-configuration/actions/workflows/build-and-release.yml/badge.svg)](https://github.com/evert-arias/neovim-configuration/actions/workflows/build-and-release.yml)
4+
5+
This Neovim configuration is tailored for a streamlined and feature-rich development experience. It includes various tools and settings to enhance productivity and ease of use.
6+
7+
## Features
8+
9+
### Syntax Highlighting & Color Schemes
10+
11+
- Treesitter integration for modern syntax highlighting.
12+
- Additional features like rainbow brackets and text subjects.
13+
- Gruvbox color scheme with dark contrast.
14+
15+
### User Interface Enhancements
16+
17+
- Status bar with Lualine.
18+
- File tree explorer with Nvim-tree.
19+
- Tab and buffer management with Bufferline.
20+
- Indentation visualization with Indent-blankline.
21+
22+
### Code Editing & Navigation
23+
24+
- Autocomplete with Coc.nvim.
25+
- Auto-pairing of brackets.
26+
- Multiple cursor support.
27+
- Navigation using Telescope for file searching, live grep, buffer switching, and more.
28+
- Custom key mappings for quick navigation, saving, quitting, etc.
29+
30+
### Integrated Development Environment (IDE) Features
31+
32+
- Integrated terminal with Toggleterm.
33+
- Easy commenting with Comment.nvim.
34+
- Task management with Todo-comments.
35+
36+
### Git Integration
37+
38+
- Inline Git signs and information with Gitsigns.
39+
40+
## Installation & Usage
41+
42+
#### Linux
43+
44+
Execute the following command to install:
45+
```bash
46+
curl -sSL installer-linux.sh | bash
47+
```
48+
49+
#### Windows
50+
51+
Download and execute `installer-windows.exe` from the releases page.
52+
53+
## Customization
54+
55+
You can customize the configuration by editing the relevant files in the `~/.config/nvim` directory. Make sure to consult the respective plugin documentation if you need help with individual plugins.
56+
57+
---
58+
59+
*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.*
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
# Validate inputs
4+
if [[ -z "$1" || -z "$2" ]]; then
5+
echo "Usage: $0 <github_repository> <release_tag>"
6+
exit 1
7+
fi
8+
9+
GITHUB_REPOSITORY=$1
10+
RELEASE_TAG=$2
11+
12+
# Create the build directory if it doesn't exist
13+
mkdir -p build
14+
15+
# Create release pack
16+
mkdir -p temp
17+
tar -czvf build/config.tar.gz --exclude='.github' --exclude='temp' --exclude='.git' --exclude='scripts' --exclude='build' .
18+
rm -rf temp
19+
20+
# Create Linux Installer
21+
cat << EOF > build/installer-linux.sh
22+
#!/bin/bash
23+
echo "Downloading Neovim configuration..."
24+
curl -LO https://github.com/$GITHUB_REPOSITORY/releases/download/$RELEASE_TAG/config.tar.gz
25+
echo "Extracting Neovim configuration..."
26+
mkdir -p ~/.config/nvim
27+
tar xz -C ~/.config/nvim -f config.tar.gz
28+
echo "Installation complete!"
29+
rm -f config.tar.gz
30+
EOF
31+
32+
chmod +x build/installer-linux.sh
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
3+
# Define the root directory of the repository
4+
REPO_ROOT=$(git rev-parse --show-toplevel)
5+
6+
# Check if git command succeeded
7+
if [ $? -ne 0 ]; then
8+
echo "Error: Git repository not found."
9+
exit 1
10+
fi
11+
12+
# Check for NSIS
13+
if ! command -v makensis &> /dev/null; then
14+
echo "Error: NSIS is not installed. Please install NSIS to continue."
15+
exit 1
16+
fi
17+
18+
# Create the build directory if it doesn't exist
19+
mkdir -p build
20+
21+
# Create NSIS Script using a Here Document
22+
cat << EOF > build/installer.nsi
23+
Outfile "installer-windows.exe"
24+
InstallDir "\$LOCALAPPDATA\\nvim"
25+
Section
26+
SetOutPath \$INSTDIR
27+
File /r /x '.git' /x '.github' /x 'temp' /x 'scripts' /x 'build' "$REPO_ROOT\\*.*"
28+
SectionEnd
29+
EOF
30+
31+
# Compile the NSIS script
32+
makensis build/installer.nsi
33+
34+
# Check if makensis command succeeded
35+
if [ $? -ne 0 ]; then
36+
echo "Error: Compilation of NSIS script failed."
37+
exit 1
38+
fi
39+
40+
echo "Compilation successful! Installer is located in build/installer-windows.exe"

version.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v1.0.1

0 commit comments

Comments
 (0)