Skip to content

Commit

Permalink
Update release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
guyrenny authored Aug 8, 2023
1 parent 429002f commit 3691e4f
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,10 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}

- name: Validate
- if: ${{ matrix.package != 'helper' }}
name: Validate
working-directory: src/${{ matrix.package }}
run: |
if [ "${{ matrix.package }}" != "helper" ]; then
sam validate
fi
run: sam validate


build:
Expand All @@ -77,13 +75,14 @@ jobs:
with:
use-installer: true

- uses: aws-actions/configure-aws-credentials@v2
- if: ${{ matrix.package != 'helper' }}
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}

- if: ${{ matrix.package }} != 'helper'
- if: ${{ matrix.package != 'helper' }}
name: Build
working-directory: ./src/${{ matrix.package }}
run: sam build --use-container
Expand All @@ -98,15 +97,15 @@ jobs:
--output-template-file packaged.yaml
- name: Store
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true }}
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true && matrix.package != 'helper' }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.package }}-packaged.yaml
path: src/${{ matrix.package }}/packaged.yaml

publish:
name: Publish
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true }}
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true && matrix.package != 'helper'}}
runs-on: ubuntu-latest
env:
AWS_SERVERLESS_BUCKET: coralogix-serverless-repo
Expand All @@ -122,23 +121,24 @@ jobs:
with:
use-installer: true

- if: ${{ matrix.package }} != 'helper'
- if: ${{ matrix.package != 'helper' }}
name: Download
uses: actions/download-artifact@v3
with:
name: ${{ matrix.package }}-packaged.yaml

- uses: aws-actions/configure-aws-credentials@v2

- if: ${{ matrix.package != 'helper' }}
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}

- if: ${{ matrix.package }} != 'helper'
- if: ${{ matrix.package != 'helper' }}
name: Publish
run: sam publish --template packaged.yaml

- if: ${{ matrix.package }} != 'helper'
- if: ${{ matrix.package != 'helper' }}
name: Store
run: |
aws s3 cp \
Expand Down

0 comments on commit 3691e4f

Please sign in to comment.