From bf332ac8519e7426ba8bd696593f4ee17299c4d7 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 13 Jun 2023 21:10:02 -0500 Subject: [PATCH 1/2] Invoke circuitpython-build-bundles identically for PRs & releases --- build/action.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build/action.yml b/build/action.yml index 063c25f..68333ba 100644 --- a/build/action.yml +++ b/build/action.yml @@ -71,9 +71,18 @@ runs: pip install . pytest fi + - name: Add the given package filename_prefix + id: package-prefix-arg + shell: bash + run: | + if [ "${{ inputs.package-prefix }}" == "" ]; then + echo prefix-arg="" >> $GITHUB_OUTPUT + else + echo prefix-arg="--package_folder_prefix ${{ inputs.package-prefix }}" >> $GITHUB_OUTPUT + fi - name: Build assets shell: bash - run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . + run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . ${{ steps.package-prefix-arg.outputs.prefix-arg }} - name: Archive bundles uses: actions/upload-artifact@v3 with: From e9a918e851fe76d96039e45ae6212f9af690b6be Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 14 Jun 2023 07:28:58 -0500 Subject: [PATCH 2/2] actually accept the package-prefix argument --- build/action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/action.yml b/build/action.yml index 68333ba..7495195 100644 --- a/build/action.yml +++ b/build/action.yml @@ -9,6 +9,12 @@ inputs: description: 'The version of Python to use in the CI' required: true default: '3.x' + package-prefix: + description: | + The prefix (or name) of your pacakge (if applicable) to use + for GitHub releases + required: true + default: "" runs: using: "composite" steps: