-
Notifications
You must be signed in to change notification settings - Fork 17
52 lines (44 loc) · 1.27 KB
/
ci.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
name: CI
on:
push:
branches: ["main"]
tags: ["v*"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
build:
name: "Validate and generate"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate airports.yaml
uses: thiagodnf/[email protected]
with:
jsonSchemaFile: schemas/airports.schema.json
yamlFiles: airports.yaml
- name: Validate navaids.yaml
uses: thiagodnf/[email protected]
with:
jsonSchemaFile: schemas/navaids.schema.json
yamlFiles: navaids.yaml
- name: Create airports.json
run: |
yq airports.yaml > /dev/null
yq -o=json -I=0 airports.yaml > airports.json
- name: Create navaids.json
run: |
yq navaids.yaml > /dev/null
yq -o=json -I=0 navaids.yaml > navaids.json
- name: Create release
if: github.ref_type == 'tag' && contains(github.ref_name, 'v')
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
name: NavData ${{ github.ref_name }}
prerelease: false
draft: true
files: |
airports.json
navaids.json