Generate Syntax Definitions #126
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
# GitHub workflow configuration file: Syntax definition generation. | |
# | |
# Copyright (C) 2022 Lucas Ritzdorf, Luca Zeuch | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# | |
# You should have received a copy of the GNU General Public License along | |
# with this program; if not, write to the Free Software Foundation, Inc., | |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
--- | |
name: Generate Syntax Definitions | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
env: | |
LYTFS_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GIT_USER: github-actions | |
GIT_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: master | |
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '^1.22' | |
- name: Cache Dependencies | |
uses: actions/cache@v2 | |
with: | |
path: .bundle/lytfs | |
key: ${{ runner.os }}-lytfs-${{ hashFiles('.bundle/lytfs') }} | |
- name: Regenerate Syntax and Completion | |
run: | | |
make generate | |
rm syntax/funcs | |
- name: Setup git | |
run: | | |
git config user.name $GIT_USER | |
git config user.email $GIT_EMAIL | |
- name: Create PR | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
commit-message: 'syntax: regenerate syntax definitions' | |
title: 'syntax: regenerate syntax definitions' | |
body: 'This PR regenerates the syntax definitions.' | |
branch: 'regenerate-syntax' | |
base: 'master' | |
author: '${{ env.GIT_USER }} <${{ env.GIT_EMAIL }}>' | |
labels: | | |
area/syntax | |
editor/vim-neovim |