Skip to content

Commit cfbf434

Browse files
committed
chore: create tags and GH releases when we build an AMI
Adding tags makes it easier to diff the changes that have been made between releases. At the moment, this information only lives in the contents of the repository (and we haven't really maintained a changelog).
1 parent 93fd309 commit cfbf434

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/ami-release.yml

+15
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,21 @@ jobs:
2020
GIT_SHA=$(git rev-parse HEAD)
2121
packer build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var-file="development-arm.vars.pkr.hcl" -var-file="common.vars.pkr.hcl" amazon-arm64.pkr.hcl
2222
23+
- name: Grab release version
24+
id: process_release_version
25+
run: |
26+
VERSION=$(sed -e 's/postgres-version = "\(.*\)"/\1/g' common.vars.pkr.hcl)
27+
GIT_SHA=$(git rev-parse HEAD)
28+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
29+
echo "git_sha=$GIT_SHA" >> "$GITHUB_OUTPUT"
30+
31+
- name: Create release
32+
uses: softprops/action-gh-release@v1
33+
with:
34+
name: ${{ steps.process_release_version.outputs.version }}
35+
tag_name: ${{ steps.process_release_version.outputs.version }}
36+
target_commitish: ${{ steps.process_release_vesion.outputs.git_sha }}
37+
2338
- name: Slack Notification on Failure
2439
if: ${{ failure() }}
2540
uses: rtCamp/action-slack-notify@v2

0 commit comments

Comments
 (0)