Skip to content

Commit

Permalink
ci: add github CI/CD for checking linting/style and automated release…
Browse files Browse the repository at this point in the history
… PRs (#39)
  • Loading branch information
mehalter committed Jun 18, 2023
1 parent c6b343b commit 643afc2
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
push:
branches: [main]
pull_request:

jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
# CLI arguments
args: --check .
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: lunarmodules/luacheck@v1
release:
name: release

if: ${{ github.ref == 'refs/heads/main' }}
needs:
- style
- lint
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
token: ${{ secrets.RELEASE_TOKEN }}
release-type: simple
package-name: nvim-window-picker
- uses: actions/checkout@v3
- uses: rickstaa/action-create-tag@v1
if: ${{ steps.release.outputs.release_created }}
with:
tag: stable
message: "Current stable release: ${{ steps.release.outputs.tag_name }}"
tag_exists_error: false
force_push_tag: true

0 comments on commit 643afc2

Please sign in to comment.