Skip to content

Commit 200df25

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 200df25

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Diff for: .github/workflows/package_core.yml

+28
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,31 @@ jobs:
157157
with:
158158
name: test-report-*
159159
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)