Skip to content

Commit 24db4db

Browse files
committed
github: upload artifacts on push
Upload the built core archive to an S3 bucket when updating branches in the main repository.
1 parent 0083f4d commit 24db4db

File tree

1 file changed

+33
-5
lines changed

1 file changed

+33
-5
lines changed

.github/workflows/package_core.yml

+33-5
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,36 @@ jobs:
152152
fi
153153
done
154154
155-
- name: Clean up intermediate artifacts
156-
uses: geekyeggo/[email protected]
157-
with:
158-
name: test-report-*
159-
failOnError: false
155+
- name: Clean up intermediate artifacts
156+
uses: geekyeggo/[email protected]
157+
with:
158+
name: test-report-*
159+
failOnError: false
160+
161+
publish-core:
162+
name: Publish core
163+
runs-on: ubuntu-latest
164+
if: ${{ github.event_name == 'push' && github.repository == 'arduino/ArduinoCore-zephyr' }}
165+
needs:
166+
- package-core
167+
- test-core
168+
environment: production
169+
permissions:
170+
id-token: write
171+
contents: read
172+
env:
173+
CORE_ARTIFACT: ${{ needs.package-core.outputs.CORE_ARTIFACT }}
174+
ARTIFACT_FILE: ${{ needs.package-core.outputs.CORE_ARTIFACT }}.tar.bz2
175+
steps:
176+
- uses: actions/download-artifact@v4
177+
with:
178+
name: ${{ env.CORE_ARTIFACT }}
179+
180+
- name: Configure AWS credentials
181+
uses: aws-actions/configure-aws-credentials@v4
182+
with:
183+
role-to-assume: ${{ secrets.IAM_ROLE }}
184+
aws-region: ${{ secrets.AWS_REGION }}
185+
186+
- name: Upload artifact
187+
run: aws s3 cp ${{ env.ARTIFACT_FILE }} s3://${{ secrets.S3_BUCKET }}/

0 commit comments

Comments
 (0)