From 823e7210e5fdb33747e646312bdfdcfc0b18df20 Mon Sep 17 00:00:00 2001 From: Tekktrik Date: Mon, 10 Jul 2023 22:08:17 -0400 Subject: [PATCH] Allow bundles to be skipped from being built --- release-gh/action.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/release-gh/action.yml b/release-gh/action.yml index 0b45309..cca484d 100644 --- a/release-gh/action.yml +++ b/release-gh/action.yml @@ -21,6 +21,13 @@ inputs: for GitHub releases required: true default: "" + ignore-bundles: + description: | + A comma and space separated list of bundles to be skipped when building. + Valid options are py, mpy, example, and json. For example, to skip + building the MPY and example bundles, this field would be: mpy, example + required: true + default: "" runs: using: "composite" steps: @@ -63,9 +70,23 @@ runs: else echo prefix-arg="--package_folder_prefix ${{ inputs.package-prefix }}" >> $GITHUB_OUTPUT fi + - name: Add the given bundle ignores + id: ignore-bundles-arg + shell: bash + run: | + if [ "${{ inputs.ignore-bundles }}" == "" ]; then + echo ignore-bundles="" >> $GITHUB_OUTPUT + else + echo ignore-bundles='--ignore "${{ inputs.ignore-bundles }}"' >> $GITHUB_OUTPUT + fi - name: Build assets shell: bash - run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . ${{ steps.package-prefix-arg.outputs.prefix-arg }} + run: | + circuitpython-build-bundles \ + --filename_prefix ${{ steps.repo-name.outputs.repo-name }} \ + --library_location . \ + ${{ steps.package-prefix-arg.outputs.prefix-arg }} \ + ${{ steps.ignore-bundles-arg.outputs.prefix-arg }} - name: Upload Release Assets uses: shogo82148/actions-upload-release-asset@v1 with: