diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..3b30831 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,14 @@ +name: format + +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - uses: JohnnyMorganz/stylua-action@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: 0.17.1 + args: --check . diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..57848f1 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,15 @@ +name: lint + +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - name: install luacheck + run: | + sudo apt-get update + sudo apt-get install lua-check + - name: lint + run: make lint diff --git a/.github/workflows/luarocks.yml b/.github/workflows/luarocks.yml new file mode 100644 index 0000000..14acdff --- /dev/null +++ b/.github/workflows/luarocks.yml @@ -0,0 +1,33 @@ +name: push-to-luarocks + +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@v4 + 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: | + `deadcolumn.nvim` assists you to maintain a specific column width + in your code by gradually displaying the colorcolumn as you + approaches it. diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..618bfdd --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,18 @@ +name: release-please + +on: + push: + branches: + - master +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-22.04 + steps: + - uses: google-github-actions/release-please-action@v3 + with: + release-type: simple + package-name: deadcolumn.nvim diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..a8e1808 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,2 @@ +globals = { 'vim' } +max_line_length = false diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..face78c --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +.PHONY: all +all: format-check lint + +.PHONY: format-check +format-check: + stylua . --check + +.PHONY: format +format: + stylua . + +.PHONY: lint +lint: + luacheck .