Skip to content

Commit a3c4421

Browse files
committed
Use attestation instead of signature
1 parent e0db18e commit a3c4421

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ jobs:
5555
release:
5656
permissions:
5757
contents: write # for creating the release
58+
attestations: write # for creating the attestation
59+
id-token: write # for creating the attestation
5860
runs-on: ubuntu-latest
5961
needs:
6062
- build
@@ -174,20 +176,32 @@ jobs:
174176
.github/scripts/generate-release-contributors.sh v$PRIOR_VERSION >> /tmp/release-notes.txt
175177
fi
176178
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+
177192
- id: create-github-release
178193
name: Create GitHub release
179194
env:
180195
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
181196
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
184197
gh release create --target $GITHUB_REF_NAME \
185198
--title "Version $VERSION" \
186199
--notes-file /tmp/release-notes.txt \
187200
v$VERSION \
188201
opentelemetry-jmx-metrics.jar \
189-
opentelemetry-jmx-metrics.jar.asc
202+
attestation.intoto.jsonl
190203
204+
# this is used as a job output
191205
echo "version=$VERSION" >> $GITHUB_OUTPUT
192206
193207
merge-change-log-to-main:

0 commit comments

Comments
 (0)