@@ -3,7 +3,7 @@ name: 📖 Release (stage)
33on :
44 push :
55 branches :
6- - " release/**"
6+ - ' release/**'
77
88jobs :
99 tests :
@@ -14,15 +14,17 @@ jobs:
1414 short_rte_list : false
1515 pre_release : true
1616
17+ # Build once with production config - these artifacts will be reused for production release
1718 builds :
18- name : Release stage builds
19+ name : Release builds (production config)
1920 uses : ./.github/workflows/build.yml
2021 needs : tests
2122 secrets : inherit
2223 with :
23- environment : " staging "
24- target : " all"
24+ environment : ' production '
25+ target : ' all'
2526
27+ # Upload to staging S3 for testing
2628 aws :
2729 uses : ./.github/workflows/aws-upload-dev.yml
2830 needs : [builds]
@@ -31,33 +33,21 @@ jobs:
3133 with :
3234 pre-release : true
3335
34- # Remove artifacts from github actions
35- remove-artifacts :
36- name : Remove artifacts
37- needs : [aws]
38- if : always()
39- runs-on : ubuntu-latest
40-
41- steps :
42- - uses : actions/checkout@v4
43- - name : Remove all artifacts
44- uses : ./.github/actions/remove-artifacts # Remove artifacts from github actions
45-
4636 approve-production-release :
4737 name : Approve production release
48- needs : [tests, builds, aws, remove-artifacts ]
38+ needs : [tests, builds, aws]
4939 if : |
5040 always() &&
5141 needs.tests.result == 'success' &&
5242 needs.builds.result == 'success' &&
53- needs.aws.result == 'success' &&
54- needs.remove-artifacts.result == 'success'
43+ needs.aws.result == 'success'
5544 runs-on : ubuntu-latest
5645 environment : ' production-approve'
5746 steps :
5847 - name : Approval for production release
5948 run : echo "Production release approved for branch ${{ github.ref_name }}"
6049
50+ # Release to production - reuses the same builds from staging
6151 release-prod :
6252 name : Release to production
6353 needs : [approve-production-release]
0 commit comments