diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a19729f0..31e5697e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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 @@ -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 @@ -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) diff --git a/Makefile b/Makefile index 54fd106f..d057ccc3 100644 --- a/Makefile +++ b/Makefile @@ -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 \