From 00f8adfa133c71a0a0d80394bb47bbb11c1a3fb6 Mon Sep 17 00:00:00 2001 From: Luciano Mammino Date: Wed, 1 Nov 2023 18:08:40 +0000 Subject: [PATCH] fix: GitHub Actions build produce a broken build (#2) fix: GitHub Actions build produce a broken build (#2) * chore: forces zig 0.10.0 * fix: workflow distinguishes between manual dispatch and release --- .github/workflows/release.yml | 15 ++++++++++++++- .github/workflows/rust.yml | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cb878a1..6de1a4f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,6 +43,8 @@ jobs: - name: Install zig uses: goto-bus-stop/setup-zig@v2 + with: + version: 0.10.0 - uses: actions/cache@v3 with: @@ -69,7 +71,7 @@ jobs: run: | zip -9 bootstrap.zip bootstrap - - name: Upload bootstrap.zip to GitHub release + - name: Upload bootstrap.zip to (existing) GitHub release uses: xresloader/upload-to-github-release@v1 if: github.event.release env: @@ -78,7 +80,18 @@ jobs: file: ".aws-sam/build/OidcAuthorizer/bootstrap.zip" release_id: ${{ github.event.release.id }} + - name: Upload bootstrap.zip to (new draft) GitHub release + uses: xresloader/upload-to-github-release@v1 + if: ${{ github.event_name == 'workflow_dispatch' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + file: ".aws-sam/build/OidcAuthorizer/bootstrap.zip" + draft: true + default_release_name: "Manual release (test)" + - name: Sam publish to SAR + if: github.event.release run: | sam package --output-template-file .aws-sam/packaged.yml --s3-bucket ${{ secrets.SAR_ARTIFACT_BUCKET }} sam publish --template .aws-sam/packaged.yml --region eu-west-1 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 66300bc..d41f8c4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -68,6 +68,8 @@ jobs: - name: Install zig uses: goto-bus-stop/setup-zig@v2 + with: + version: 0.10.0 - uses: actions/cache@v3 with: