2022-11-29 14:40:13 +00:00
|
|
|
name: CI
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tests:
|
2022-12-20 07:56:59 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
# os: [ubuntu-latest, windows-latest]
|
|
|
|
os: [ubuntu-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
2022-11-29 14:40:13 +00:00
|
|
|
steps:
|
2024-06-07 15:28:52 +01:00
|
|
|
- uses: actions/checkout@v4
|
2022-11-29 14:40:13 +00:00
|
|
|
- name: Install Neovim
|
2022-12-20 07:56:59 +00:00
|
|
|
shell: bash
|
2022-11-29 14:40:13 +00:00
|
|
|
run: |
|
2023-03-19 19:57:12 +00:00
|
|
|
mkdir -p /tmp/nvim
|
|
|
|
wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -O /tmp/nvim/nvim.appimage
|
|
|
|
cd /tmp/nvim
|
|
|
|
chmod a+x ./nvim.appimage
|
|
|
|
./nvim.appimage --appimage-extract
|
|
|
|
echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH
|
2022-11-29 14:40:13 +00:00
|
|
|
- name: Run Tests
|
|
|
|
run: |
|
|
|
|
nvim --version
|
2023-01-04 19:23:36 +00:00
|
|
|
[ ! -d tests ] && exit 0
|
2024-06-27 11:48:50 +01:00
|
|
|
./tests/run
|
2024-06-29 11:00:15 +01:00
|
|
|
docs:
|
|
|
|
runs-on: ubuntu-latest
|
2024-06-30 07:48:03 +01:00
|
|
|
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'folke' }}
|
2024-06-29 11:00:15 +01:00
|
|
|
needs: tests
|
2024-06-29 11:01:52 +01:00
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ github.token }}
|
2024-06-29 11:00:15 +01:00
|
|
|
steps:
|
2024-06-29 11:03:42 +01:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
ref: docs
|
2024-06-29 11:00:15 +01:00
|
|
|
- name: Generate Docs
|
|
|
|
shell: bash
|
|
|
|
run: gh workflow run "Deploy to Github Pages" --ref docs
|
2024-06-25 16:41:14 +01:00
|
|
|
community:
|
|
|
|
runs-on: ubuntu-latest
|
2024-06-30 07:48:03 +01:00
|
|
|
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'folke' }}
|
2024-06-25 16:41:14 +01:00
|
|
|
steps:
|
2024-06-29 11:03:42 +01:00
|
|
|
- uses: actions/checkout@v4
|
2024-06-25 16:41:14 +01:00
|
|
|
- name: Install Neovim
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
mkdir -p /tmp/nvim
|
|
|
|
wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -O /tmp/nvim/nvim.appimage
|
|
|
|
cd /tmp/nvim
|
|
|
|
chmod a+x ./nvim.appimage
|
|
|
|
./nvim.appimage --appimage-extract
|
|
|
|
echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH
|
|
|
|
- name: Rockspec Build
|
|
|
|
id: rockspec-build
|
|
|
|
uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
path: build
|
|
|
|
key: rockspec-build
|
|
|
|
- name: Generate Rockspec
|
|
|
|
if: steps.rockspec-build.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
nvim -l lua/lazy/build.lua
|
|
|
|
- name: Push changes
|
2024-06-29 11:06:54 +01:00
|
|
|
uses: stefanzweifel/git-auto-commit-action@v5
|
2024-06-25 16:41:14 +01:00
|
|
|
with:
|
|
|
|
commit_message: "chore(build): auto-generate rockspec mappings"
|
|
|
|
commit_user_name: "github-actions[bot]"
|
|
|
|
commit_user_email: "github-actions[bot]@users.noreply.github.com"
|
|
|
|
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
|
2022-11-29 14:40:13 +00:00
|
|
|
release:
|
|
|
|
name: release
|
2024-06-30 07:48:03 +01:00
|
|
|
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'folke' }}
|
2022-11-29 14:40:13 +00:00
|
|
|
needs:
|
|
|
|
- tests
|
2024-06-29 11:00:15 +01:00
|
|
|
- docs
|
2022-11-29 14:40:13 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-06-07 15:31:18 +01:00
|
|
|
- uses: googleapis/release-please-action@v4
|
2022-12-29 22:26:27 +00:00
|
|
|
id: release
|
2022-11-29 14:40:13 +00:00
|
|
|
with:
|
2024-06-23 05:59:54 +01:00
|
|
|
config-file: .github/release-please-config.json
|
|
|
|
manifest-file: .github/.release-please-manifest.json
|
2024-06-07 15:28:52 +01:00
|
|
|
- uses: actions/checkout@v4
|
2022-12-29 21:58:10 +00:00
|
|
|
- name: tag stable versions
|
2022-12-29 22:26:27 +00:00
|
|
|
if: ${{ steps.release.outputs.release_created }}
|
2022-12-29 21:58:10 +00:00
|
|
|
run: |
|
|
|
|
git config user.name github-actions[bot]
|
|
|
|
git config user.email github-actions[bot]@users.noreply.github.com
|
|
|
|
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
|
|
|
|
git tag -d stable || true
|
|
|
|
git push origin :stable || true
|
|
|
|
git tag -a stable -m "Last Stable Release"
|
|
|
|
git push origin stable
|