Skip to content

Commit 3ea0984

Browse files
committed
chore: test simple file
Signed-off-by: Arjun Raja Yogidas <[email protected]>
1 parent be1e5a7 commit 3ea0984

File tree

1 file changed

+4
-105
lines changed

1 file changed

+4
-105
lines changed

.github/workflows/release-automation.yaml

Lines changed: 4 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Release Finch latest version
22
on:
33
workflow_dispatch:
44
workflow_call:
5+
pull_request:
6+
branches:
7+
- main
58

69
jobs:
710
get-latest-tag:
@@ -19,114 +22,10 @@ jobs:
1922
- name: 'Get the latest tag'
2023
id: latest-tag
2124
uses: "WyriHaximus/github-action-get-previous-tag@04e8485ecb6487243907e330d522ff60f02283ce" # v1.4.0
22-
23-
build-and-test-finch-pkg:
24-
needs: get-latest-tag
25-
uses: ./.github/workflows/build-and-test-pkg.yaml
26-
secrets: inherit
27-
with:
28-
ref_name: ${{ needs.get-latest-tag.outputs.tag }}
29-
30-
upload-pkg-and-dependency-source-code-to-release:
31-
needs:
32-
- get-latest-tag
33-
- build-and-test-finch-pkg
34-
uses: ./.github/workflows/upload-installer-to-release.yaml
35-
permissions:
36-
# This is required for configure-aws-credentials to request an OIDC JWT ID token to access AWS resources later on.
37-
# More info: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings
38-
id-token: write
39-
contents: write # this is used to upload to the release
40-
secrets: inherit
41-
with:
42-
ref_name: ${{ needs.get-latest-tag.outputs.tag }}
43-
44-
build-and-test-finch-msi:
45-
needs: get-latest-tag
46-
uses: ./.github/workflows/build-and-test-msi.yaml
47-
permissions:
48-
# This is required for configure-aws-credentials to request an OIDC JWT ID token to access AWS resources later on.
49-
# More info: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings
50-
id-token: write
51-
contents: read # this is required for actions/checkout
52-
secrets: inherit
53-
with:
54-
ref_name: ${{ needs.get-latest-tag.outputs.tag }}
55-
56-
upload-msi-to-release:
57-
needs:
58-
- get-latest-tag
59-
- build-and-test-finch-msi
60-
uses: ./.github/workflows/upload-msi-to-release.yaml
61-
permissions:
62-
# This is required for configure-aws-credentials to request an OIDC JWT ID token to access AWS resources later on.
63-
# More info: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings
64-
id-token: write
65-
contents: read # this is required for actions/checkout
66-
secrets: inherit
67-
with:
68-
ref_name: ${{ needs.get-latest-tag.outputs.tag }}
69-
70-
build-and-test-finch-deb:
71-
needs: get-latest-tag
72-
uses: ./.github/workflows/build-and-test-deb.yaml
73-
permissions:
74-
# This is required for configure-aws-credentials to request an OIDC JWT ID token to access AWS resources later on.
75-
# More info: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings
76-
id-token: write
77-
contents: read # this is required for actions/checkout
78-
secrets: inherit
79-
with:
80-
ref_name: ${{ needs.get-latest-tag.outputs.tag }}
81-
82-
upload-deb-to-release:
83-
needs:
84-
- get-latest-tag
85-
- build-and-test-finch-deb
86-
uses: ./.github/workflows/upload-deb-to-release.yaml
87-
permissions:
88-
# This is required for configure-aws-credentials to request an OIDC JWT ID token to access AWS resources later on.
89-
# More info: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings
90-
id-token: write
91-
contents: write # this is required for uploading the release assets
92-
secrets: inherit
93-
with:
94-
ref_name: ${{ needs.get-latest-tag.outputs.tag }}
95-
96-
update-latest-version-in-s3:
97-
needs:
98-
- get-latest-tag
99-
- upload-pkg-and-dependency-source-code-to-release
100-
- upload-msi-to-release
101-
runs-on: ubuntu-latest
102-
permissions:
103-
id-token: write
104-
contents: read
105-
steps:
106-
- name: Configure AWS credentials
107-
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0
108-
with:
109-
role-to-assume: ${{ secrets.ROLE }}
110-
role-session-name: update-latest-version-in-s3
111-
aws-region: ${{ secrets.REGION }}
112-
113-
- name: Update latest version in S3
114-
run: |
115-
# Create latest-version.json with the latest Finch release version to track updates
116-
cat > latest-version.json << EOF
117-
{
118-
"latest_version": "${{ needs.get-latest-tag.outputs.tag }}"
119-
}
120-
EOF
121-
122-
# Upload to S3
123-
aws s3 cp latest-version.json s3://${{ secrets.ARTIFACT_BUCKET_NAME }}/manifest/latest-version.json --content-type "application/json"
124-
25+
12526
upload-release-definition-to-s3:
12627
needs:
12728
- get-latest-tag
128-
- upload-pkg-and-dependency-source-code-to-release
129-
- upload-msi-to-release
13029
runs-on: ubuntu-latest
13130
permissions:
13231
id-token: write

0 commit comments

Comments
 (0)