Skip to content
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
20 changes: 17 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,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:
- build
Expand Down Expand Up @@ -174,20 +176,32 @@ 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 jmx-metrics/build/libs/opentelemetry-jmx-metrics-$VERSION-alpha.jar opentelemetry-jmx-metrics.jar

- id: attest
uses: actions/attest-build-provenance@v2
with:
subject-path: opentelemetry-jmx-metrics.jar

- 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 jmx-metrics/build/libs/opentelemetry-jmx-metrics-$VERSION-alpha.jar opentelemetry-jmx-metrics.jar
cp jmx-metrics/build/libs/opentelemetry-jmx-metrics-$VERSION-alpha.jar.asc opentelemetry-jmx-metrics.jar.asc
gh release create --target $GITHUB_REF_NAME \
--title "Version $VERSION" \
--notes-file /tmp/release-notes.txt \
v$VERSION \
opentelemetry-jmx-metrics.jar \
opentelemetry-jmx-metrics.jar.asc
attestation.intoto.jsonl

# this is used as a job output
echo "version=$VERSION" >> $GITHUB_OUTPUT

merge-change-log-to-main:
Expand Down
Loading