Skip to content

Commit

Permalink
ci: fix release workflow to not fail if no Lambda annotations changes
Browse files Browse the repository at this point in the history
  • Loading branch information
philasmar committed Nov 1, 2024
1 parent d51554c commit 6887d20
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
11 changes: 11 additions & 0 deletions .autover/changes/0c99b5db-b5be-46c5-a157-69838fec23d7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"Projects": [
{
"Name": "Amazon.Lambda.Annotations",
"Type": "Patch",
"ChangelogMessages": [
"test config"
]
}
]
}
21 changes: 13 additions & 8 deletions .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ jobs:
run: |
dotnet build Libraries/Libraries.sln -c Release
git add "*.template"
git commit -m "Update test app CloudFormation templates"
if git diff --cached --quiet; then
echo "No .template files were staged; skipping commit."
else
git commit -m "Update test app CloudFormation templates"
fi
# Update the changelog based on the change files
- name: Update Changelog
run: autover changelog
Expand All @@ -98,10 +103,10 @@ jobs:
changelog=$(autover changelog --output-to-console)
echo "CHANGELOG<<EOF"$'\n'"$changelog"$'\n'EOF >> "$GITHUB_OUTPUT"
# Create the Release PR and label it
- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ env.AWS_SECRET_TOKEN }}
run: |
pr_url="$(gh pr create --title "${{ steps.read-release-name.outputs.VERSION }}" --body "${{ steps.read-changelog.outputs.CHANGELOG }}" --base dev --head ${{ steps.create-release-branch.outputs.BRANCH }})"
gh label create "Release PR" --description "A Release PR that includes versioning and changelog changes" -c "#FF0000" -f
gh pr edit $pr_url --add-label "Release PR"
# - name: Create Pull Request
# env:
# GITHUB_TOKEN: ${{ env.AWS_SECRET_TOKEN }}
# run: |
# pr_url="$(gh pr create --title "${{ steps.read-release-name.outputs.VERSION }}" --body "${{ steps.read-changelog.outputs.CHANGELOG }}" --base dev --head ${{ steps.create-release-branch.outputs.BRANCH }})"
# gh label create "Release PR" --description "A Release PR that includes versioning and changelog changes" -c "#FF0000" -f
# gh pr edit $pr_url --add-label "Release PR"

0 comments on commit 6887d20

Please sign in to comment.