Skip to content

fix(ci): allow unsecure commands for Lua setup in GitHub Actions #26

fix(ci): allow unsecure commands for Lua setup in GitHub Actions

fix(ci): allow unsecure commands for Lua setup in GitHub Actions #26

Workflow file for this run

name: Create Release
on:
push:
branches:
- main
- center-horizontally
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Lua
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
uses: leafo/gh-actions-lua@v2
with:
luaVersion: "5.1"
- name: Install dependencies for Lua
run: luarocks install busted
- name: Run Lua tests
run: busted
- name: Set up Neovim
run: |
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz
tar xzf nvim-linux64.tar.gz
sudo mv nvim-linux64 /usr/local/
- name: Install lazy.nvim
run: |
git clone --filter=blob:none https://github.com/folke/lazy.nvim.git --branch=stable ~/.local/share/nvim/site/pack/lazy/start/lazy.nvim
- name: Install plugin dependencies
run: |
mkdir -p ~/.config/nvim
echo 'require("lazy").setup({' > ~/.config/nvim/init.lua
echo ' "nvim-treesitter/nvim-treesitter",' >> ~/.config/nvim/init.lua
echo ' "nvim-lua/plenary.nvim",' >> ~/.config/nvim/init.lua
echo ' "lewis6991/gitsigns.nvim",' >> ~/.config/nvim/init.lua
echo '})' >> ~/.config/nvim/init.lua
nvim --headless -c 'quitall'
- name: Test horizontal scrolling
run: |
nvim --headless +'lua require("typewriter").setup({ enable_horizontal_scroll = true })' +'autocmd BufEnter * normal! zt' +'qall'
- name: Set up Lua environment
run: echo "${{ github.workspace }}/.lua/bin" >> $GITHUB_PATH
- name: Verify Lua installation
run: lua -v
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
## New Features
- Refactored code to modularize the plugin structure while preserving functionality.
- Ensured horizontal scrolling works correctly with the new modular structure.
## Previous Changes
- Introduced `enable_notifications` option to control notifications for actions like enabling/disabling typewriter mode, and aligning code blocks.
- Added new `:TWTop` and `:TWBottom` commands to align the current code block with the top or bottom of the screen, respectively.
- Introduced `keep_cursor_position` option to maintain cursor's relative position within the text when using `:TWCenter`, `:TWTop`, and `:TWBottom`.
- Added `:TWCenter` command to center the view around the current code block or function using Tree-sitter.
- Introduced Tree-sitter as a dependency for intelligent code block detection.
- Updated installation instructions to include Tree-sitter setup.
- Moved `center_block_config.lua` to the `utils` folder for better organization.
- Enhanced README with information about the `:TWCenter` command and Tree-sitter dependency.
## Core Features
- Keeps the cursor centered on the screen while typing or navigating.
- Simple commands to enable, disable, and toggle the typewriter mode.
- Integrates with ZenMode and True Zen for a seamless distraction-free environment.
For more details, please check the [README](https://github.com/joshuadanpeterson/typewriter.nvim/blob/main/README.md).
draft: false
prerelease: false