@@ -22,21 +22,11 @@ jobs:
22
22
- name : " Create release output"
23
23
run : echo '🎬 Release process for version ${{ inputs.version }} started by @${{ github.triggering_actor }}' >> $GITHUB_STEP_SUMMARY
24
24
25
- - name : " Create temporary app token"
26
- uses : actions/create-github-app-token@v1
27
- id : app-token
25
+ - name : " Generate token and checkout repository"
26
+ uses : mongodb-labs/drivers-github-tools/secure-checkout@v2
28
27
with :
29
- app-id : ${{ vars.APP_ID }}
30
- private-key : ${{ secrets.APP_PRIVATE_KEY }}
31
-
32
- - name : " Store GitHub token in environment"
33
- run : echo "GH_TOKEN=${{ steps.app-token.outputs.token }}" >> "$GITHUB_ENV"
34
- shell : bash
35
-
36
- - uses : actions/checkout@v4
37
- with :
38
- submodules : true
39
- token : ${{ env.GH_TOKEN }}
28
+ app_id : ${{ vars.APP_ID }}
29
+ private_key : ${{ secrets.APP_PRIVATE_KEY }}
40
30
41
31
- name : " Store version numbers in env variables"
42
32
run : |
@@ -71,11 +61,11 @@ jobs:
71
61
- name : " Create draft release"
72
62
run : echo "RELEASE_URL=$(gh release create ${{ inputs.version }} --target ${{ github.ref_name }} --title "${{ inputs.version }}" --generate-notes --draft)" >> "$GITHUB_ENV"
73
63
74
- # This step creates the signed release tag
75
64
- name : " Create release tag"
76
- uses : mongodb-labs/drivers-github-tools/git-sign @v2
65
+ uses : mongodb-labs/drivers-github-tools/tag-version @v2
77
66
with :
78
- command : " git tag -m 'Release ${{ inputs.version }}' -s --local-user=${{ env.GPG_KEY_ID }} ${{ inputs.version }}"
67
+ version : ${{ inputs.version }}
68
+ tag_message_template : ' Release ${VERSION}'
79
69
80
70
# TODO: Manually merge using ours strategy. This avoids merge-up pull requests being created
81
71
# Process is:
@@ -84,14 +74,77 @@ jobs:
84
74
# 3. push next branch
85
75
# 4. switch back to release branch, then push
86
76
87
- - name : " Push changes from release branch"
88
- run : git push
89
-
90
- # Pushing the release tag starts build processes that then produce artifacts for the release
91
- - name : " Push release tag"
92
- run : git push origin ${{ inputs.version }}
93
-
94
77
- name : " Set summary"
95
78
run : |
96
79
echo '🚀 Created tag and drafted release for version [${{ inputs.version }}](${{ env.RELEASE_URL }})' >> $GITHUB_STEP_SUMMARY
97
80
echo '✍️ You may now update the release notes and publish the release when ready' >> $GITHUB_STEP_SUMMARY
81
+
82
+ static-analysis :
83
+ needs : prepare-release
84
+ name : " Run Static Analysis"
85
+ uses : ./.github/workflows/static-analysis.yml
86
+ with :
87
+ ref : refs/tags/${{ inputs.version }}
88
+ permissions :
89
+ security-events : write
90
+ id-token : write
91
+
92
+ publish-ssdlc-assets :
93
+ needs : static-analysis
94
+ environment : release
95
+ name : " Publish SSDLC Assets"
96
+ runs-on : ubuntu-latest
97
+ permissions :
98
+ security-events : read
99
+ id-token : write
100
+ contents : write
101
+
102
+ steps :
103
+ - name : " Generate token and checkout repository"
104
+ uses : mongodb-labs/drivers-github-tools/secure-checkout@v2
105
+ with :
106
+ app_id : ${{ vars.APP_ID }}
107
+ private_key : ${{ secrets.APP_PRIVATE_KEY }}
108
+ ref : refs/tags/${{ inputs.version }}
109
+
110
+ # Sets the S3_ASSETS environment variable used later
111
+ - name : " Set up drivers-github-tools"
112
+ uses : mongodb-labs/drivers-github-tools/setup@v2
113
+ with :
114
+ aws_role_arn : ${{ secrets.AWS_ROLE_ARN }}
115
+ aws_region_name : ${{ vars.AWS_REGION_NAME }}
116
+ aws_secret_id : ${{ secrets.AWS_SECRET_ID }}
117
+
118
+ - name : " Generate authorized publication document"
119
+ uses : mongodb-labs/drivers-github-tools/authorized-pub@v2
120
+ with :
121
+ product_name : " MongoDB Laravel Integration"
122
+ release_version : ${{ inputs.version }}
123
+ filenames : " "
124
+ token : ${{ env.GH_TOKEN }}
125
+
126
+ - name : " Download SBOM file from Silk"
127
+ uses : mongodb-labs/drivers-github-tools/sbom@v2
128
+ with :
129
+ silk_asset_group : mongodb-laravel-integration
130
+
131
+ - name : " Upload SBOM as release artifact"
132
+ run : gh release upload ${{ inputs.version }} ${{ env.S3_ASSETS }}/cyclonedx.sbom.json
133
+ continue-on-error : true
134
+
135
+ - name : " Generate SARIF report from code scanning alerts"
136
+ uses : mongodb-labs/drivers-github-tools/code-scanning-export@v2
137
+ with :
138
+ ref : ${{ inputs.version }}
139
+ output-file : ${{ env.S3_ASSETS }}/code-scanning-alerts.json
140
+
141
+ - name : " Generate compliance report"
142
+ uses : mongodb-labs/drivers-github-tools/compliance-report@v2
143
+ with :
144
+ token : ${{ env.GH_TOKEN }}
145
+
146
+ - name : Upload S3 assets
147
+ uses : mongodb-labs/drivers-github-tools/upload-s3-assets@v2
148
+ with :
149
+ version : ${{ inputs.version }}
150
+ product_name : laravel-mongodb
0 commit comments