|
55 | 55 | release: |
56 | 56 | permissions: |
57 | 57 | contents: write # for creating the release |
| 58 | + attestations: write # for creating the attestation |
| 59 | + id-token: write # for creating the attestation |
58 | 60 | runs-on: ubuntu-latest |
59 | 61 | needs: |
60 | 62 | - build |
@@ -174,20 +176,32 @@ jobs: |
174 | 176 | .github/scripts/generate-release-contributors.sh v$PRIOR_VERSION >> /tmp/release-notes.txt |
175 | 177 | fi |
176 | 178 |
|
| 179 | + - name: Simplify jar path for attesting and attaching |
| 180 | + run: | |
| 181 | + cp jmx-metrics/build/libs/opentelemetry-jmx-metrics-$VERSION-alpha.jar opentelemetry-jmx-metrics.jar |
| 182 | +
|
| 183 | + - id: attest |
| 184 | + uses: actions/attest-build-provenance@v2 |
| 185 | + with: |
| 186 | + subject-path: opentelemetry-jmx-metrics.jar |
| 187 | + |
| 188 | + - name: Rename attestation bundle file for attaching |
| 189 | + run: | |
| 190 | + cp ${{ steps.attest.outputs.bundle-path }} attestation.intoto.jsonl |
| 191 | +
|
177 | 192 | - id: create-github-release |
178 | 193 | name: Create GitHub release |
179 | 194 | env: |
180 | 195 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
181 | 196 | run: | |
182 | | - cp jmx-metrics/build/libs/opentelemetry-jmx-metrics-$VERSION-alpha.jar opentelemetry-jmx-metrics.jar |
183 | | - cp jmx-metrics/build/libs/opentelemetry-jmx-metrics-$VERSION-alpha.jar.asc opentelemetry-jmx-metrics.jar.asc |
184 | 197 | gh release create --target $GITHUB_REF_NAME \ |
185 | 198 | --title "Version $VERSION" \ |
186 | 199 | --notes-file /tmp/release-notes.txt \ |
187 | 200 | v$VERSION \ |
188 | 201 | opentelemetry-jmx-metrics.jar \ |
189 | | - opentelemetry-jmx-metrics.jar.asc |
| 202 | + attestation.intoto.jsonl |
190 | 203 |
|
| 204 | + # this is used as a job output |
191 | 205 | echo "version=$VERSION" >> $GITHUB_OUTPUT |
192 | 206 |
|
193 | 207 | merge-change-log-to-main: |
|
0 commit comments