Skip to content

Commit be1e5a7

Browse files
committed
feat: trigger toolbox rlease on upstream release
Signed-off-by: Arjun Raja Yogidas <[email protected]>
1 parent 2f67a60 commit be1e5a7

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/release-automation.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,50 @@ 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+
- upload-pkg-and-dependency-source-code-to-release
129+
- upload-msi-to-release
130+
runs-on: ubuntu-latest
131+
permissions:
132+
id-token: write
133+
contents: read
134+
steps:
135+
- name: Configure AWS credentials
136+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0
137+
with:
138+
role-to-assume: ${{ secrets.TOOLBOX_TRIGGER_ROLE }}
139+
role-session-name: upload-release-definition-to-s3
140+
aws-region: ${{ secrets.TOOLBOX_TRIGGER_REGION }}
141+
142+
- name: Create and upload release definition to S3
143+
run: |
144+
# Extract version without 'v' prefix for filename
145+
VERSION="${{ needs.get-latest-tag.outputs.tag }}"
146+
VERSION_NO_V="${VERSION#v}"
147+
148+
# Create release definition JSON file
149+
cat > "release-def-${VERSION_NO_V}.json" << EOF
150+
{
151+
"tag_name": "${{ needs.get-latest-tag.outputs.tag }}",
152+
"source_s3uri": "s3://finch-installer-private/",
153+
"source_access_role": "arn:aws:iam::090529234398:role/BundlerRole",
154+
"assets": [
155+
{
156+
"name": "Finch-${{ needs.get-latest-tag.outputs.tag }}-aarch64.pkg",
157+
"os": "mac",
158+
"architecture": "aarch64"
159+
},
160+
{
161+
"name": "Finch-${{ needs.get-latest-tag.outputs.tag }}-x86_64.pkg",
162+
"os": "mac",
163+
"architecture": "x86_64"
164+
}
165+
]
166+
}
167+
EOF
168+
169+
# Upload to S3
170+
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)