Merge pull request #22 from gurselalp/patch-4 #104
Workflow file for this run
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
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/yaml-schema-checker@v0.0.12 | |
with: | |
jsonSchemaFile: schemas/airports.schema.json | |
yamlFiles: airports.yaml | |
- name: Validate navaids.yaml | |
uses: thiagodnf/yaml-schema-checker@v0.0.12 | |
with: | |
jsonSchemaFile: schemas/navaids.schema.json | |
yamlFiles: navaids.yaml | |
- name: Create airports.json | |
run: | | |
yq airports.yaml > /dev/null | |
yq -o=json -I=0 '[.[] | .ID = (.ID | tostring) | .Name = (.Name | tostring)]' airports.yaml > airports.json | |
- name: Create navaids.json | |
run: | | |
yq navaids.yaml > /dev/null | |
yq -o=json -I=0 '[.[] | .ID = (.ID | tostring) | .Name = (.Name | tostring)]' navaids.yaml > navaids.json | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: navdata | |
path: | | |
airports.json | |
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 |