Skip to content

Commit 8212c61

Browse files
committed
feat: trigger toolbox rlease on upstream release
Signed-off-by: Arjun Raja Yogidas <[email protected]>
1 parent 579d326 commit 8212c61

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

.github/workflows/release-automation.yaml

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
secrets: inherit
9393
with:
9494
ref_name: ${{ needs.get-latest-tag.outputs.tag }}
95-
95+
9696
update-latest-version-in-s3:
9797
needs:
9898
- get-latest-tag
@@ -121,3 +121,46 @@ jobs:
121121
122122
# Upload to S3
123123
aws s3 cp latest-version.json s3://${{ secrets.ARTIFACT_BUCKET_NAME }}/manifest/latest-version.json --content-type "application/json"
124+
125+
upload-release-definition-to-s3:
126+
needs:
127+
- get-latest-tag
128+
runs-on: ubuntu-latest
129+
permissions:
130+
id-token: write
131+
contents: read
132+
steps:
133+
- name: Configure AWS credentials
134+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0
135+
with:
136+
role-to-assume: ${{ secrets.TOOLBOX_TRIGGER_ROLE }}
137+
role-session-name: upload-release-definition-to-s3
138+
aws-region: ${{ secrets.TOOLBOX_TRIGGER_REGION }}
139+
140+
- name: Create and upload release definition to S3
141+
run: |
142+
# Extract version without 'v' prefix for filename
143+
VERSION="${{ needs.get-latest-tag.outputs.tag }}"
144+
VERSION_NO_V="${VERSION#v}"
145+
146+
# Create release definition JSON file
147+
cat > "release-def-${VERSION_NO_V}.json" << EOF
148+
{
149+
"tag_name": "${VERSION}",
150+
"assets": [
151+
{
152+
"name": "Finch-${{ needs.get-latest-tag.outputs.tag }}-aarch64.pkg",
153+
"os": "mac",
154+
"architecture": "aarch64"
155+
},
156+
{
157+
"name": "Finch-${{ needs.get-latest-tag.outputs.tag }}-x86_64.pkg",
158+
"os": "mac",
159+
"architecture": "x86_64"
160+
}
161+
]
162+
}
163+
EOF
164+
165+
# Upload to S3
166+
aws s3 cp "release-def-${VERSION_NO_V}.json" s3://${{ secrets.TOOLBOX_TRIGGER_BUCKET }}/manifest/release-def-${VERSION_NO_V}.json --content-type "application/json"

0 commit comments

Comments
 (0)