Skip to content

Commit b97b8c2

Browse files
committed
update license automatically
1 parent 7622205 commit b97b8c2

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/update-bricks-file.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ permissions:
1111
jobs:
1212
steps:
1313
runs-on: ubuntu-latest
14+
env:
15+
PYTHON_VERSION: '3.13'
16+
TASKFILE_VERSION: 'v3.44.0'
17+
TASKFILE_PATH: '/home/runner/go/bin'
1418
steps:
1519
- name: Checkout repository
1620
uses: actions/checkout@v4
@@ -59,6 +63,21 @@ jobs:
5963
LATEST_RELEASE=${{ steps.get-latest-version.outputs.LATEST_RELEASE }}
6064
find libs/ -name 'arduino_app_bricks-*.whl' ! -name "arduino_app_bricks-${LATEST_RELEASE}-py3-none-any.whl" -delete
6165
66+
- name: Set up Python
67+
if: steps.check-branch.outputs.branch_exists != 'true' && steps.check-update.outputs.update_needed != 'false'
68+
uses: actions/setup-python@v5
69+
with:
70+
python-version: ${{ env.PYTHON_VERSION }
71+
72+
- name: Update license headers and files
73+
if: steps.check-branch.outputs.branch_exists != 'true' && steps.check-update.outputs
74+
run: |
75+
python -m venv .venv
76+
. .venv/bin/activate
77+
which task || curl -sSfL https://taskfile.dev/install.sh | sh -s -- -b ${{ env.TASKFILE_PATH }} ${{ env.TASKFILE_VERSION }}
78+
export PATH="${{ env.TASKFILE_PATH }}:$PATH"
79+
task license
80+
6281
- name: Create Pull Request
6382
if: steps.check-branch.outputs.branch_exists != 'true' && steps.check-update.outputs.update_needed != 'false'
6483
uses: peter-evans/create-pull-request@v8
@@ -69,4 +88,5 @@ jobs:
6988
body: "This PR updates the Arduino App Bricks wheel file to the latest version ${{ steps.get-latest-version.outputs.LATEST_RELEASE }}."
7089
commit-message: "Update bricks whl to ${{ steps.get-latest-version.outputs.LATEST_RELEASE }}"
7190
add-paths: |
72-
libs/arduino_app_bricks-*.whl
91+
libs/arduino_app_bricks-*.whl
92+
THIRD-PARTY-LICENSES.json

0 commit comments

Comments
 (0)