Skip to content

Commit e05cac5

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 fc57a37 commit e05cac5

File tree

1 file changed

+33
-5
lines changed

1 file changed

+33
-5
lines changed

Diff for: .github/workflows/package_core.yml

+33-5
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,36 @@ jobs:
169169
fi
170170
done
171171
172-
- name: Clean up intermediate artifacts
173-
uses: geekyeggo/[email protected]
174-
with:
175-
name: test-report-*
176-
failOnError: false
172+
- name: Clean up intermediate artifacts
173+
uses: geekyeggo/[email protected]
174+
with:
175+
name: test-report-*
176+
failOnError: false
177+
178+
publish-core:
179+
name: Publish core
180+
runs-on: ubuntu-latest
181+
if: ${{ github.event_name == 'push' && github.repository == 'arduino/ArduinoCore-zephyr' }}
182+
needs:
183+
- package-core
184+
- test-core
185+
environment: production
186+
permissions:
187+
id-token: write
188+
contents: read
189+
env:
190+
CORE_ARTIFACT: ${{ needs.package-core.outputs.CORE_ARTIFACT }}
191+
ARTIFACT_FILE: ${{ needs.package-core.outputs.CORE_ARTIFACT }}.tar.bz2
192+
steps:
193+
- uses: actions/download-artifact@v4
194+
with:
195+
name: ${{ env.CORE_ARTIFACT }}
196+
197+
- name: Configure AWS credentials
198+
uses: aws-actions/configure-aws-credentials@v4
199+
with:
200+
role-to-assume: ${{ secrets.IAM_ROLE }}
201+
aws-region: ${{ secrets.AWS_REGION }}
202+
203+
- name: Upload artifact
204+
run: aws s3 cp ${{ env.ARTIFACT_FILE }} s3://${{ secrets.S3_BUCKET }}/

0 commit comments

Comments
 (0)