release-paths.yml RawHistoryFolder
1name: Release Paths
2
3permissions:
4 contents: read
5
6on:
7 push:
8 branches: [main, next]
9 paths:
10 - 'docs/**'
11 - '*.md'
12 - 'install.sh'
13 - 'scripts/**'
14 - 'flatpak/**'
15 - 'aur/**'
16 - '.goreleaser.yaml'
17 - '.github/workflows/aur.yml'
18 - '.github/workflows/release-paths.yml'
19 pull_request:
20 branches: [main, next]
21 paths:
22 - 'docs/**'
23 - '*.md'
24 - 'install.sh'
25 - 'scripts/**'
26 - 'flatpak/**'
27 - 'aur/**'
28 - '.goreleaser.yaml'
29 - '.github/workflows/aur.yml'
30 - '.github/workflows/release-paths.yml'
31
32jobs:
33 validate:
34 runs-on: ubuntu-latest
35 concurrency:
36 group: release-paths-${{ github.event.pull_request.number || github.ref }}
37 cancel-in-progress: true
38 steps:
39 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
40 with:
41 persist-credentials: false
42 - name: Validate shell entrypoints
43 run: |
44 shopt -s nullglob globstar
45 files=(install.sh scripts/**/*.sh aur/*/PKGBUILD)
46 for f in "${files[@]}"; do
47 bash -n "$f"
48 done
49 - name: Validate release YAML
50 run: |
51 ruby -e 'require "psych"; Psych.safe_load_file(".goreleaser.yaml", permitted_classes: [], aliases: true); puts "validated .goreleaser.yaml"'
52 ruby -e 'require "psych"; Psych.safe_load_file(".github/workflows/aur.yml", permitted_classes: [], aliases: true); puts "validated .github/workflows/aur.yml"'
53 ruby -e 'require "psych"; Psych.safe_load_file(".github/workflows/release-paths.yml", permitted_classes: [], aliases: true); puts "validated .github/workflows/release-paths.yml"'
54 - name: Validate Flatpak metadata XML
55 run: |
56 python3 - <<'PY'
57 from pathlib import Path
58 import xml.etree.ElementTree as ET
59
60 for path in Path('flatpak').glob('*.xml'):
61 ET.parse(path)
62 print(f'validated {path}')
63 PY
64 - name: Check docs and packaging conflict markers
65 run: |
66 if grep -RInE '^(<<<<<<<|>>>>>>>)([[:space:]].*)?$' *.md .goreleaser.yaml docs install.sh scripts flatpak aur; then
67 echo 'Found conflict marker in docs or release-adjacent files' >&2
68 exit 1
69 fi