Skip to content

Commit ff61b4a

Browse files
authored
Use attestation instead of signature (#1728)
1 parent afff89d commit ff61b4a

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
release:
1818
permissions:
1919
contents: write # for creating the release
20+
id-token: write # for signing artifacts with Sigstore
21+
attestations: write # for uploading attestations
2022
runs-on: ubuntu-latest
2123
needs:
2224
- common
@@ -152,16 +154,24 @@ jobs:
152154
.github/scripts/generate-release-contributors.sh v$PRIOR_VERSION >> /tmp/release-notes.txt
153155
fi
154156
155-
- id: create-github-release
156-
name: Create GitHub release
157-
env:
158-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
157+
- name: Simplify paths for attaching
159158
run: |
160159
cp jmx-metrics/build/libs/opentelemetry-jmx-metrics-$VERSION-alpha.jar opentelemetry-jmx-metrics.jar
161160
cp jmx-metrics/build/libs/opentelemetry-jmx-metrics-$VERSION-alpha.jar.asc opentelemetry-jmx-metrics.jar.asc
162161
cp jmx-scraper/build/libs/opentelemetry-jmx-scraper-$VERSION-alpha.jar opentelemetry-jmx-scraper.jar
163162
cp jmx-scraper/build/libs/opentelemetry-jmx-scraper-$VERSION-alpha.jar.asc opentelemetry-jmx-scraper.jar.asc
164-
163+
164+
- uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
165+
with:
166+
subject-path: |
167+
opentelemetry-jmx-metrics.jar
168+
opentelemetry-jmx-scraper.jar
169+
170+
- id: create-github-release
171+
name: Create GitHub release
172+
env:
173+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
174+
run: |
165175
gh release create --target $GITHUB_REF_NAME \
166176
--title "Version $VERSION" \
167177
--notes-file /tmp/release-notes.txt \

RELEASING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ and deadlocks.
5858
* Run the [Release workflow](https://github.com/open-telemetry/opentelemetry-java-contrib/actions/workflows/release.yml).
5959
* Press the "Run workflow" button, then select the release branch from the dropdown list,
6060
e.g. `release/v1.9.x`, and click the "Run workflow" button below that.
61-
* This workflow will publish the artifacts to maven central and will publish a GitHub release
62-
with release notes based on the change log and with the jmx metrics jar attached.
61+
* This workflow will:
62+
* Publish the artifacts to Maven Central
63+
* Generate [GitHub Artifact Attestations](https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations) for the JMX Metrics and JMX Scraper jars
64+
* Publish a GitHub release with release notes based on the change log and with the jars attached
6365
* Review and merge the pull request that it creates for updating the change log in main
6466
(note that if this is not a patch release then the change log on main may already be up-to-date,
6567
in which case no pull request will be created).

0 commit comments

Comments
 (0)