Skip to content

Commit 496fa64

Browse files
authored
Add release attestations (#15020)
1 parent 397e621 commit 496fa64

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 2 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+
id-token: write # for signing artifacts with Sigstore
25+
attestations: write # for uploading attestations
2426
runs-on: ubuntu-latest
2527
needs:
2628
- common
@@ -170,13 +172,22 @@ jobs:
170172
.github/scripts/generate-release-contributors.sh v$PRIOR_VERSION >> /tmp/release-notes.txt
171173
fi
172174
175+
- name: Simplify paths for attaching
176+
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
179+
180+
- uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
181+
with:
182+
subject-path: |
183+
opentelemetry-javaagent.jar
184+
opentelemetry-java-instrumentation-SBOM.zip
185+
173186
- id: create-github-release
174187
name: Create GitHub release
175188
env:
176189
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177190
run: |
178-
cp javaagent/build/libs/opentelemetry-javaagent-${VERSION}.jar opentelemetry-javaagent.jar
179-
cp javaagent/build/libs/opentelemetry-javaagent-${VERSION}.jar.asc opentelemetry-javaagent.jar.asc
180191
gh release create --target $GITHUB_REF_NAME \
181192
--title "Version $VERSION" \
182193
--notes-file /tmp/release-notes.txt \

RELEASING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ and deadlocks.
6565
- Run the [Release workflow](https://github.com/open-telemetry/opentelemetry-java-instrumentation/actions/workflows/release.yml).
6666
- Press the "Run workflow" button, then select the release branch from the dropdown list,
6767
e.g. `release/v1.9.x`, and click the "Run workflow" button below that.
68-
- This workflow will publish the artifacts to maven central and will publish a GitHub release
69-
with release notes based on the change log and with the javaagent jar attached.
68+
- This workflow will:
69+
- Publish the artifacts to Maven Central
70+
- Generate [GitHub Artifact Attestations](https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations) for the Java agent jar and SBOM bundle
71+
- Publish a GitHub release with release notes, Java agent jar, and SBOM bundle
7072
- Review and merge the pull request that it creates for updating the apidiff baseline version
7173
to the newly released version (note that this pull request won't be made until after the release
7274
is available in maven central).

0 commit comments

Comments
 (0)