Skip to content

Commit

Permalink
fix: version variable wasn't being set correctly for proper relases (#13
Browse files Browse the repository at this point in the history
)
  • Loading branch information
obs-gh-colinhutchinson authored Oct 12, 2023
1 parent 2c353b5 commit 7cb1048
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
outputs:
version: ${{ steps.prerelease.outputs.release-version }}
version: ${{ steps.release-version.outputs.VERSION }}
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -63,14 +63,12 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set version for aws-release job
id: set-version
id: release-version
run: |
version=${{ steps.prerelease.outputs.release-version }}
if [ -z "$version" ]; then
version=${{ steps.fullrelease.outputs.release-version }}
fi
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "VERSION=${{ env.VERSION }}" >> "$GITHUB_OUTPUT"
env:
VERSION: ${{ (steps.prerelease.outputs.release-version != '') && steps.prerelease.outputs.release-version || steps.fullrelease.outputs.release-version }}

aws-release:
needs: [fetch-regions, github-release]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -102,7 +100,7 @@ jobs:
- name: aws sam release (versioned)
run: make sam-package-all
env:
VERSION: ${{ needs.github-release.outputs.version }}
VERSION: ${{ needs.github-release.outputs.VERSION }}
AWS_REGION: ${{ matrix.region }}

- name: aws sam release (beta)
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ sam-package-all:
sam-package: sam-build
$(call check_var,APP)
$(call check_var,AWS_REGION)
$(call check_var,VERSION)
echo "Packaging for app: $(APP) in region: $(AWS_REGION)"
sam package \
--template-file apps/$(APP)/.aws-sam/build/$(AWS_REGION)/template.yaml \
Expand Down

0 comments on commit 7cb1048

Please sign in to comment.