From cba54482223b08c3bbeac4f4b1eb3e3dbed469e3 Mon Sep 17 00:00:00 2001 From: Dave Kerr Date: Tue, 14 May 2024 01:09:59 +0100 Subject: [PATCH] fix: samples path in zip (#330) * fix: samples path in zip * build: store artifacts * build: store artifacts * fix: correct artifacts path --- .github/workflows/pull-request.yaml | 7 +++++++ .github/workflows/release-please.yaml | 7 +++++++ scripts/build-samples.sh | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 326fab5c..5c1fd2a8 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -23,6 +23,13 @@ jobs: - name: Build run: make build + # Store the artifacts in case we want to validate samples etc. + - name: Store Artifacts + uses: actions/upload-artifact@v4 + with: + name: artifacts + path: artifacts + # See: # https://github.com/marketplace/actions/deploy-pr-preview deploy-preview: diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index 830a337f..714bae3c 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -46,6 +46,13 @@ jobs: run: make build if: ${{ steps.release.outputs.release_created }} + # Store the artifacts in case we want to validate samples etc. + - name: Store Artifacts + uses: actions/upload-artifact@v4 + with: + name: artifacts + path: artifacts + # Deploy the website. - name: Deploy uses: JamesIves/github-pages-deploy-action@v4 diff --git a/scripts/build-samples.sh b/scripts/build-samples.sh index d245552e..fb976f98 100755 --- a/scripts/build-samples.sh +++ b/scripts/build-samples.sh @@ -43,5 +43,5 @@ mkdir -p ./artifacts/samples/repositories ) # Zip up and tar up the samples -zip -r ./artifacts/samples.zip ./artifacts/samples +(cd ./artifacts && zip -r ./samples.zip ./samples) tar czf ./artifacts/samples.tar.gz -C ./artifacts/samples .