diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c4b8af7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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