diff --git a/.github/workflows/luarocks.yml b/.github/workflows/luarocks.yml new file mode 100644 index 00000000..2e97f0cd --- /dev/null +++ b/.github/workflows/luarocks.yml @@ -0,0 +1,34 @@ +--- +name: "luarocks upload" +on: + push: + tags: + - '*' + release: + types: + - created # Triggered by release-please + pull_request: # Tests a local luarocks install without publishing on PRs + workflow_dispatch: # Allow manual trigger +jobs: + luarocks-upload: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Required to count the commits + - name: Get Version + # Tags created by GitHub releases don't trigger push: tags workflows + # So we have to determine the tag manually. + run: echo "LUAROCKS_VERSION=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV + - name: LuaRocks Upload + uses: nvim-neorocks/luarocks-tag-release@v5 + env: + LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }} + with: + version: ${{ env.LUAROCKS_VERSION }} + detailed_description: | + Vim's diff mode is pretty good, but there is no convenient way to quickly bring up all modified files in a diffsplit. + This plugin aims to provide a simple, unified, single tabpage interface that lets you easily review all changed files for any git rev. + license: "GPL-3.0" + dependencies: | + nvim-web-devicons diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 00000000..1d4fca62 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,19 @@ +--- +name: Release Please + +on: + push: + branches: + - main + +jobs: + release: + name: release + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v3 + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN_FOR_UPDATES }} + with: + release-type: simple + package-name: diffview.nvim diff --git a/README.md b/README.md index 7b3578df..fa577a3f 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ for any git rev. ## Installation +[![LuaRocks](https://img.shields.io/luarocks/v/sindrets/diffview.nvim?logo=lua&color=purple)](https://luarocks.org/modules/sindrets/diffview.nvim) + Install the plugin with your package manager of choice. ```vim diff --git a/diffview.nvim-scm-1.rockspec b/diffview.nvim-scm-1.rockspec new file mode 100644 index 00000000..8f9d488d --- /dev/null +++ b/diffview.nvim-scm-1.rockspec @@ -0,0 +1,32 @@ +local _MODREV, _SPECREV = 'scm', '-1' +rockspec_format = "3.0" +package = 'diffview.nvim' +version = _MODREV .. _SPECREV + +description = { + summary = 'Single tabpage interface for easily cycling through diffs for all modified files for any git rev.', + labels = { 'neovim', 'neovim-plugin', 'git', 'diff', 'neovim-lua', 'neovim-lua-plugin', }, + detailed = [[ + Vim's diff mode is pretty good, but there is no convenient way to quickly bring up all modified files in a diffsplit. + This plugin aims to provide a simple, unified, single tabpage interface that lets you easily review all changed files for any git rev. + ]], + homepage = 'https://github.com/sindrets/diffview.nvim', + license = 'GPL-3.0', +} + +dependencies = { + 'lua >= 5.1, < 5.4', + 'nvim-web-devicons', +} + +source = { + url = 'git://github.com/sindrets/diffview.nvim', +} + +build = { + type = 'builtin', + copy_directories = { + 'doc', + 'plugin', + }, +}