Skip to content

Commit

Permalink
fix: GitHub Actions build produce a broken build (#2)
Browse files Browse the repository at this point in the history
fix: GitHub Actions build produce a broken build (#2)

* chore: forces zig 0.10.0
* fix: workflow distinguishes between manual dispatch and release
  • Loading branch information
lmammino authored Nov 1, 2023
1 parent cc60bf3 commit 00f8adf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
2 changes: 2 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 00f8adf

Please sign in to comment.