@@ -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