Skip to content

Commit 3c236c4

Browse files
authored
Merge pull request #16 from tekktrik/test/mpy-bundle
Allow for input package prefix
2 parents 3d93bae + 8868b8e commit 3c236c4

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

release-gh/action.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ inputs:
1515
description: 'The version of Python to use in the CI'
1616
required: true
1717
default: '3.x'
18+
package-prefix:
19+
description: |
20+
The prefix (or name) of your pacakge (if applicable) to use
21+
for GitHub releases
22+
required: true
23+
default: ""
1824
runs:
1925
using: "composite"
2026
steps:
@@ -48,9 +54,18 @@ runs:
4854
shell: bash
4955
run: |
5056
source actions-ci/install.sh
57+
- name: Add the given package filename_prefix
58+
id: package-prefix-arg
59+
shell: bash
60+
run: |
61+
if [ "${{ inputs.package-prefix }}" == "" ]; then
62+
echo prefix-arg="" >> $GITHUB_OUTPUT
63+
else
64+
echo prefix-arg="--package_folder_prefix ${{ inputs.package-prefix }}" >> $GITHUB_OUTPUT
65+
fi
5166
- name: Build assets
5267
shell: bash
53-
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
68+
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . ${{ steps.package-prefix-arg.outputs.prefix-arg }}
5469
- name: Upload Release Assets
5570
uses: shogo82148/actions-upload-release-asset@v1
5671
with:

0 commit comments

Comments
 (0)