refactor: implement dfd v2 support as well as new package management #105
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
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
name: Label, Build & Lint PR | |
jobs: | |
autolabel: | |
uses: ./.github/workflows/autolabel.yml | |
secrets: inherit | |
filter: | |
name: Register changed paths | |
if: ${{ !github.event.pull_request.draft && !contains(github.event.pull_request.labels.*.name , 'release') }} | |
runs-on: ubuntu-latest | |
outputs: | |
js-interface: ${{ steps.changes.outputs.js-interface }} | |
example: ${{ steps.changes.outputs.example }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: changes | |
with: | |
filters: | | |
js-interface: | |
- 'src/js/**' | |
lint: | |
name: Lint 📝 | |
runs-on: ubuntu-latest | |
needs: [filter] | |
if: ${{ needs.filter.outputs.js-interface == 'true' && !github.event.pull_request.draft && !contains(github.event.pull_request.labels.*.name , 'release') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
cache: "npm" | |
- name: Install node modules | |
run: npm ci | |
- name: Run linting | |
run: npm run lint:js -- --max-warnings 0 | |
build-test: | |
name: Build & test 🛠️ | |
runs-on: ubuntu-latest | |
if: ${{ !github.event.pull_request.draft && !contains(github.event.pull_request.labels.*.name , 'release') }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
filter: blob:none | |
- name: Create env file | |
run: | | |
touch .env | |
echo NAVIGATION_DATA_SIGNED_URL=${{ secrets.NAVIGATION_DATA_SIGNED_URL }} >> .env | |
- name: Build WASM module | |
run: npm run build:wasm-workflow | |
- name: Test | |
run: npm run test-workflow | |
- name: Upload WASM module to GitHub | |
uses: actions/upload-artifact@v4 | |
with: | |
name: msfs_navigation_data_interface.wasm | |
path: ./out/msfs_navigation_data_interface.wasm |