Skip to content

Commit a9417d1

Browse files
authored
Merge pull request #24 from tekktrik/dev/build-prefix
Fix building bundles for build CI
2 parents 5fe68a7 + 1934d99 commit a9417d1

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

build/action.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ inputs:
99
description: 'The version of Python to use in the CI'
1010
required: true
1111
default: '3.x'
12+
package-prefix:
13+
description: |
14+
The prefix (or name) of your pacakge (if applicable) to use
15+
for GitHub releases
16+
required: true
17+
default: ""
1218
runs:
1319
using: "composite"
1420
steps:
@@ -71,9 +77,18 @@ runs:
7177
pip install .
7278
pytest
7379
fi
80+
- name: Add the given package filename_prefix
81+
id: package-prefix-arg
82+
shell: bash
83+
run: |
84+
if [ "${{ inputs.package-prefix }}" == "" ]; then
85+
echo prefix-arg="" >> $GITHUB_OUTPUT
86+
else
87+
echo prefix-arg="--package_folder_prefix ${{ inputs.package-prefix }}" >> $GITHUB_OUTPUT
88+
fi
7489
- name: Build assets
7590
shell: bash
76-
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
91+
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . ${{ steps.package-prefix-arg.outputs.prefix-arg }}
7792
- name: Archive bundles
7893
uses: actions/upload-artifact@v3
7994
with:

0 commit comments

Comments
 (0)