Skip to content

Commit 9bf0582

Browse files
committed
Test
1 parent b9eefb8 commit 9bf0582

File tree

4 files changed

+16
-23
lines changed

4 files changed

+16
-23
lines changed

.github/workflows/release-build.yml

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ env:
1313
PUBLIC_REPOSITORY: public.ecr.aws/aws-observability/adot-autoinstrumentation-java
1414
PRIVATE_REPOSITORY: 020628701572.dkr.ecr.us-west-2.amazonaws.com/adot-autoinstrumentation-java
1515
PRIVATE_REGISTRY: 020628701572.dkr.ecr.us-west-2.amazonaws.com
16+
ARTIFACT_NAME: aws-opentelemetry-agent.jar
1617

1718
permissions:
1819
id-token: write
@@ -117,34 +118,21 @@ jobs:
117118
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
118119
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
119120

121+
122+
- name: Get SHA256 checksum of release artifact
123+
id: get_sha256
124+
run: |
125+
cp "otelagent/build/libs/aws-opentelemetry-agent-${{ github.event.inputs.version }}.jar" ${{ env.ARTIFACT_NAME }}
126+
shasum -a 256 ${{ env.ARTIFACT_NAME }} > ${{ env.ARTIFACT_NAME }}.sha256
127+
120128
- name: Create release
121129
env:
122130
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
123131
run: |
124-
cp "otelagent/build/libs/aws-opentelemetry-agent-${{ github.event.inputs.version }}.jar" aws-opentelemetry-agent.jar
132+
125133
gh release create --target "$GITHUB_REF_NAME" \
126134
--title "Release v${{ github.event.inputs.version }}" \
127135
--draft \
128136
"v${{ github.event.inputs.version }}" \
129-
aws-opentelemetry-agent.jar
130-
131-
- name: Get SHA256 checksum of wheel file
132-
id: get_sha256
133-
env:
134-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
135-
run: |
136-
checksum=$(shasum -a 256 aws-opentelemetry-agent.jar | awk '{ print $1 }')
137-
echo "CHECKSUM=$checksum" >> $GITHUB_OUTPUT
138-
139-
- name: Append checksum and update version
140-
env:
141-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
142-
run: |
143-
echo "${{ github.event.inputs.version }} ${{ steps.get_sha256.outputs.CHECKSUM }}" >> checksum.txt
144-
echo "${{ github.event.inputs.version }}" > version.txt
145-
146-
git config --local user.email "github-actions[bot]@users.noreply.github.com"
147-
git config --local user.name "GitHub Action Release Workflow"
148-
git add checksum.txt version.txt
149-
git commit -m "Update latest version and append checksum"
150-
git push
137+
${{ env.ARTIFACT_NAME }} \
138+
${{ env.ARTIFACT_NAME }}.sha256

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,8 @@ Please note that as per policy, we're providing support via GitHub on a best eff
4646

4747
## Security issue notifications
4848
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
49+
50+
## Checksum Verification
51+
Artifacts released will include a `.sha256` file for checksum verification starting from v1.32.6
52+
To verify, run the command `shasum -a 256 -c <artifact_name>.sha256`
53+
It should return the output `<artifact_name>: OK` if the validation is successful

checksum.txt

Whitespace-only changes.

version.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)