Skip to content

chore: optimize tmLanguage #41

chore: optimize tmLanguage

chore: optimize tmLanguage #41

---
name: Build Artifacts
on:
push:
branches: [ main ]
paths-ignore: [ "*.md" ]
pull_request:
branches: [ main ]
paths-ignore: [ "*.md" ]
jobs:
Compile-All:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-unstable
- name: Compile TextMate Grammar
run: |
chmod +x ./scripts/compile-grammar.sh
./scripts/compile-grammar.sh
shell: bash
- name: Compile Coverage Badge SVG
run: |
sudo apt-get install -y xsltproc
make -B $(pwd)/images/coverage-badge.svg
shell: bash
- name: Import GPG key
id: import-gpg
uses: crazy-max/[email protected]
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: GPG user
run: |
echo "fingerprint: ${{ steps.import-gpg.outputs.fingerprint }}"
echo "username: ${{ steps.import-gpg.outputs.name }}"
echo "email: ${{ steps.import-gpg.outputs.email }}"
shell: bash
- name: Auto-commit changes
id: auto-commit-action
uses: stefanzweifel/[email protected]
with:
commit_message: auto-commit of artifacts
branch: main
commit_options: '--no-verify -S'
file_pattern: 'syntaxes/* images/*'
commit_author: "${{ steps.import-gpg.outputs.name }} <${{ steps.import-gpg.outputs.email }}>"
commit_user_name: "${{ steps.import-gpg.outputs.name }}"
commit_user_email: "${{ steps.import-gpg.outputs.email }}"
- name: Run if changes have been detected
if: steps.auto-commit-action.outputs.changes_detected == 'true'
run: echo "New TextMate grammar was published"
shell: bash