Skip to content

Revert "Windows Utils 1.5.0" #15

Revert "Windows Utils 1.5.0"

Revert "Windows Utils 1.5.0" #15

name: Compile Extension
on:
pull_request:
branches: [ "main" ]
jobs:
setup:
name: "Setup"
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write
outputs:
extension-path: ${{ steps.extract-extension-path.outputs.path }}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Extract extension path
id: extract-extension-path
env:
GH_TOKEN: ${{ github.token }}
run: |
pr_paths=$(gh pr view ${{ github.event.pull_request.number }} --json files)
files_count=$(jq '.files | length' <<< ${pr_paths})
if [[ $files_count -gt 1 ]]
then
echo "Only one extension per pull-request is allowed!"
exit 1
elif [[ $files_count -eq 0 ]]
then
echo "No extension was found"
exit 1
fi
echo "path=$(jq -r '.files[0].path' <<< ${pr_paths})" >> $GITHUB_OUTPUT
- name: Check extension path
run: echo "${{ steps.extract-extension-path.outputs.path }}"
build:
name: "Build"
needs: [ setup ]
permissions:
contents: write
pull-requests: write
repository-projects: write
runs-on: ubuntu-latest
outputs:
artifact-name: ${{ steps.build_extension.outputs.artifact-name }}
artifact-path: ${{ steps.build_extension.outputs.artifact-path }}
manifest: ${{ steps.build_extension.outputs.manifest }}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Init Submodule
run: git submodule update --init --recursive ./${{ needs.setup.outputs.extension-path }}
- name: Build Extension
id: build_extension
uses: Macro-Deck-App/Actions/build-extension@main
with:
extension-path: ${{ needs.setup.outputs.extension-path }}
artifact-name: ${{ github.event.pull_request.number }}