-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
96 additions
and
34 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,96 @@ | ||
name: CI/CD | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
jobs: | ||
style: | ||
name: Stylua Formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: JohnnyMorganz/stylua-action@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
version: latest | ||
args: --check . | ||
lint: | ||
name: Luacheck Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: lunarmodules/luacheck@v1 | ||
vimdoc: | ||
name: Generate Vimdoc | ||
runs-on: ubuntu-latest | ||
needs: | ||
- style | ||
- lint | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: panvimdoc | ||
uses: kdheepak/panvimdoc@main | ||
with: | ||
vimdoc: astrolsp | ||
version: "Neovim >= 0.9.0" | ||
demojify: true | ||
treesitter: true | ||
- name: Push changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "chore(build): auto-generate vimdoc" | ||
docs: | ||
name: Generate Lua API | ||
runs-on: ubuntu-latest | ||
needs: | ||
- style | ||
- lint | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Lua | ||
uses: leafo/gh-actions-lua@v10 | ||
with: | ||
luaVersion: 5.4 | ||
- name: Install LDoc | ||
uses: leafo/gh-actions-luarocks@v4 | ||
- name: Setup dependencies | ||
run: luarocks install ldoc | ||
- name: Build Docs | ||
run: | | ||
ldoc . | ||
- name: Deploy | ||
uses: nwtgck/actions-netlify@v2.0 | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
publish-dir: docs | ||
production-deploy: ${{ github.ref == 'refs/heads/main' }} | ||
release: | ||
name: Release Please | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
needs: | ||
- docs | ||
- vimdoc | ||
- 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: astrolsp | ||
- 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 |
This file was deleted.
Oops, something went wrong.
Empty file.
4d479c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://astrolsp.astronvim.com as production
🚀 Deployed on https://64ca5f47cf57ad225390ce36--zesty-daffodil-898349.netlify.app