Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use attestation instead of signature #13267

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
release:
permissions:
contents: write # for creating the release
attestations: write # for creating the attestation
id-token: write # for creating the attestation
runs-on: ubuntu-latest
needs:
- required-jobs
Expand Down Expand Up @@ -169,20 +171,33 @@ jobs:
.github/scripts/generate-release-contributors.sh v$PRIOR_VERSION >> /tmp/release-notes.txt
fi

- name: Simplify jar path for attesting and attaching
run: |
cp javaagent/build/libs/opentelemetry-javaagent-${VERSION}.jar opentelemetry-javaagent.jar

- id: attest
uses: actions/attest-build-provenance@v2
with:
subject-path: |
opentelemetry-javaagent.jar
opentelemetry-java-instrumentation-SBOM.zip

- name: Rename attestation bundle file for attaching
run: |
cp ${{ steps.attest.outputs.bundle-path }} attestation.intoto.jsonl

- id: create-github-release
name: Create GitHub release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cp javaagent/build/libs/opentelemetry-javaagent-${VERSION}.jar opentelemetry-javaagent.jar
cp javaagent/build/libs/opentelemetry-javaagent-${VERSION}.jar.asc opentelemetry-javaagent.jar.asc
gh release create --target $GITHUB_REF_NAME \
--title "Version $VERSION" \
--notes-file /tmp/release-notes.txt \
v$VERSION \
opentelemetry-javaagent.jar \
opentelemetry-javaagent.asc.jar \
opentelemetry-java-instrumentation-SBOM.zip
opentelemetry-java-instrumentation-SBOM.zip \
attestation.intoto.jsonl

echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "prior-version=$PRIOR_VERSION" >> $GITHUB_OUTPUT
Expand Down
Loading