-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 2.19 KB
/
build-artifacts.yml
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
65
66
67
68
69
70
71
72
73
74
75
76
---
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:
- name: Maximize Build Space
uses: easimon/maximize-build-space@v10
with:
root-reserve-mb: 512
swap-size-mb: 1024
remove-dotnet: "true"
- name: Review Build Space
run: |
echo "Free space:"
df -h
- 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
- uses: DeterminateSystems/magic-nix-cache-action@v6
- name: Compile TextMate Grammar
run: |
chmod +x ./scripts/compile-grammar.sh
./scripts/compile-grammar.sh
- name: Compile Coverage Badge SVG
run: |
apt-get install -y xsltproc
make -B $(pwd)/images/coverage-badge.svg
- 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 }}"
- 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 --signoff -S'
file_pattern: 'syntaxes/* images/*'
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"