-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add makefile and github workflows
- Loading branch information
bekaboo
committed
Feb 18, 2024
1 parent
b84cdf2
commit bd23d68
Showing
6 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
globals = { 'vim' } | ||
max_line_length = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 . |