Skip to content

Commit ae7f480

Browse files
committed
Use attestation instead of signature
1 parent e975536 commit ae7f480

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
release:
2222
permissions:
2323
contents: write # for creating the release
24+
attestations: write # for creating the attestation
25+
id-token: write # for creating the attestation
2426
runs-on: ubuntu-latest
2527
needs:
2628
- required-jobs
@@ -169,20 +171,33 @@ jobs:
169171
.github/scripts/generate-release-contributors.sh v$PRIOR_VERSION >> /tmp/release-notes.txt
170172
fi
171173
174+
- name: Simplify jar path for attesting and attaching
175+
run: |
176+
cp javaagent/build/libs/opentelemetry-javaagent-${VERSION}.jar opentelemetry-javaagent.jar
177+
178+
- id: attest
179+
uses: actions/attest-build-provenance@v2
180+
with:
181+
subject-path: |
182+
opentelemetry-javaagent.jar
183+
opentelemetry-java-instrumentation-SBOM.zip
184+
185+
- name: Rename attestation bundle file for attaching
186+
run: |
187+
cp ${{ steps.attest.outputs.bundle-path }} attestations.intoto.jsonl
188+
172189
- id: create-github-release
173190
name: Create GitHub release
174191
env:
175192
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
176193
run: |
177-
cp javaagent/build/libs/opentelemetry-javaagent-${VERSION}.jar opentelemetry-javaagent.jar
178-
cp javaagent/build/libs/opentelemetry-javaagent-${VERSION}.jar.asc opentelemetry-javaagent.jar.asc
179194
gh release create --target $GITHUB_REF_NAME \
180195
--title "Version $VERSION" \
181196
--notes-file /tmp/release-notes.txt \
182197
v$VERSION \
183198
opentelemetry-javaagent.jar \
184-
opentelemetry-javaagent.asc.jar \
185-
opentelemetry-java-instrumentation-SBOM.zip
199+
opentelemetry-java-instrumentation-SBOM.zip \
200+
attestations.intoto.jsonl
186201
187202
echo "version=$VERSION" >> $GITHUB_OUTPUT
188203
echo "prior-version=$PRIOR_VERSION" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)