summaryrefslogtreecommitdiff
path: root/.github/workflows/plugins.yml
blob: 350bc96e30f4d8c3362d892070b1be75830a7517 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: plugins-version-bump

on:
  workflow_dispatch:
    inputs:
      logLevel:
        description: 'Log level'
        required: false
        default: 'warning'
        type: choice
        options:
        - info
        - warning
        - debug
  schedule:
    # note: this will keep updating the existing branch
    - cron: "*/15 10-14 * * 0,6"
    - cron: "0 14 * * 1-5"

jobs:
  plugins-version-bump:
    if: github.repository_owner == 'LunarVim'
    runs-on: ubuntu-latest
    continue-on-error: false
    permissions:
      contents: write
      pull-requests: write
    steps:
      - uses: actions/checkout@v3

      - name: Install neovim binary
        uses: rhysd/action-setup-vim@v1
        with:
          neovim: true
          version: nightly

      - name: Install LunarVim
        timeout-minutes: 4
        run: |
          ./utils/installer/install.sh --local --no-install-dependencies

      - name: run upgrade script
        run: make generate_new_lockfile

      - name: Re-install LunarVim
        timeout-minutes: 4
        run: |
          ./utils/installer/uninstall.sh --remove-backups
          ./utils/installer/install.sh --local --no-install-dependencies

      - name: Run unit-tests
        # NOTE: make sure to adjust the timeout if you start adding a lot of tests
        timeout-minutes: 4
        run: make test

      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v4
        with:
          branch: plugins-bump
          delete-branch: true # Delete the branch when closing pull requests, and when undeleted after merging.
          token: ${{ secrets.GITHUB_TOKEN }}
          author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
          title: "chore: bump plugins version"
          commit-message: "chore: bump plugins version"