From 817890f2bba225f4b9da84f3aae067c846b343e2 Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Fri, 5 Jan 2024 09:44:23 +0100 Subject: [PATCH] ci: action to generate generated-sources.json --- .../workflows/create-generated-sources.yml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/create-generated-sources.yml diff --git a/.github/workflows/create-generated-sources.yml b/.github/workflows/create-generated-sources.yml new file mode 100644 index 00000000..12e004dd --- /dev/null +++ b/.github/workflows/create-generated-sources.yml @@ -0,0 +1,47 @@ +name: Create generated-rources.json + +on: + workflow_dispatch: {} + +jobs: + build: + runs-on: ubuntu-latest + steps: + # Install flatpak-node-generator + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: '3.8' + + - name: Install pipx + uses: CfirTsabari/actions-pipx@v1 + + - name: Clone flatpak-builder-tools repo and flatpak-node-generator + run: | + cd ../ + git clone https://github.com/flatpak/flatpak-builder-tools.git + cd flatpak-builder-tools/node + pipx install . + + # Install Antares + - name: Check out Git repository + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 20 + + - name: Install dependencies + run: npm i --lockfile-version 2 #--package-lock-only + + - name: Generate generated-sources.json + run: flatpak-node-generator npm -r package-lock.json + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: generated-sources + retention-days: 3 + path: | + generated-sources.json